Open a position immediately at the current market price
curl --request POST \
--url https://gateway.amana.io/trading/positions/market \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "<string>",
"amount": 1,
"sl": 1,
"tp": 1,
"comment": "<string>"
}
'import requests
url = "https://gateway.amana.io/trading/positions/market"
payload = {
"symbol": "<string>",
"amount": 1,
"sl": 1,
"tp": 1,
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbol: '<string>', amount: 1, sl: 1, tp: 1, comment: '<string>'})
};
fetch('https://gateway.amana.io/trading/positions/market', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.amana.io/trading/positions/market",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'amount' => 1,
'sl' => 1,
'tp' => 1,
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.amana.io/trading/positions/market"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.amana.io/trading/positions/market")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.amana.io/trading/positions/market")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}{}trading
Open a position immediately at the current market price
Executes a market order at the best available price right now. Use this when the user wants to enter a trade immediately without specifying a price. Amount is always in USD. Do not use this for limit or stop orders — use openLimitOrder instead.
POST
/
trading
/
positions
/
market
Open a position immediately at the current market price
curl --request POST \
--url https://gateway.amana.io/trading/positions/market \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"symbol": "<string>",
"amount": 1,
"sl": 1,
"tp": 1,
"comment": "<string>"
}
'import requests
url = "https://gateway.amana.io/trading/positions/market"
payload = {
"symbol": "<string>",
"amount": 1,
"sl": 1,
"tp": 1,
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({symbol: '<string>', amount: 1, sl: 1, tp: 1, comment: '<string>'})
};
fetch('https://gateway.amana.io/trading/positions/market', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://gateway.amana.io/trading/positions/market",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'amount' => 1,
'sl' => 1,
'tp' => 1,
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://gateway.amana.io/trading/positions/market"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://gateway.amana.io/trading/positions/market")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway.amana.io/trading/positions/market")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"amount\": 1,\n \"sl\": 1,\n \"tp\": 1,\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}{}Authorizations
JWT token obtained from authentication endpoints
Body
application/json
Trading symbol, for example XAUUSD, EURUSD, or AAPL.
Trade direction. Use 'buy' to go long, 'sell' to go short.
Available options:
buy, sell Trade size in account currency (USD). For example, 1000 means $1,000 worth of the instrument.
Required range:
x >= 0Optional stop loss price level. The position closes automatically if the market hits this price.
Required range:
x >= 0Optional take profit price level. The position closes automatically in profit if the market hits this price.
Required range:
x >= 0Optional comment or note for the order.
Last modified on October 7, 2026
