curl --request POST \
--url 'https://gateway.amana.io/trading/positions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}'
import requests
url = "https://gateway.amana.io/trading/positions"
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
payload = {
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://gateway.amana.io/trading/positions', {
method: 'POST',
headers: {"Authorization": "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({"symbol": "<string>", "side": "buy", "type": "unit", "amount": 123.45, "sl": 123.45, "tp": 123.45, "price": 123.45, "slAmount": 123.45, "tpAmount": 123.45, "comment": "<string>"}),
});
console.log(await response.json());
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{}
Trading
Place an order
Open a position at market price, or place a pending limit or stop order by setting a price.
POST
/
trading
/
positions
curl --request POST \
--url 'https://gateway.amana.io/trading/positions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}'
import requests
url = "https://gateway.amana.io/trading/positions"
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
payload = {
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://gateway.amana.io/trading/positions', {
method: 'POST',
headers: {"Authorization": "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({"symbol": "<string>", "side": "buy", "type": "unit", "amount": 123.45, "sl": 123.45, "tp": 123.45, "price": 123.45, "slAmount": 123.45, "tpAmount": 123.45, "comment": "<string>"}),
});
console.log(await response.json());
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{}
Body
Content type:application/json
Trade direction. Use ‘buy’ to go long, ‘sell’ to go short.Available options:
buy, sellUnit of the
amount field. Use ‘unit’ when amount is expressed in instrument units (e.g. 0.1 lots). Use ‘amount’ when expressed in money (e.g. 1000 USD).Available options: unit, amountOptional stop loss price. The position will automatically close if the market reaches this level.Minimum:
0Optional take profit price. The position will automatically close in profit if the market reaches this level.Minimum:
0Response
200 Success.
Possible Errors
| Error | Possible cause | What to do |
|---|---|---|
| 400 | Invalid or missing field, amount outside limits | Check the request against the schema and the instrument’s size limits. |
| 401 | Token missing or expired | Log in again or use the refresh token. |
| 403 | IP not whitelisted, or account restricted | Confirm your IP is whitelisted; otherwise contact Amana. |
| 409 / 422 | Market closed, insufficient balance or margin | Check trading hours and balance, then retry. |
| 429 / 5xx | Rate limit, or temporary issue on our side | Retry with backoff; contact support if it persists. |
curl --request POST \
--url 'https://gateway.amana.io/trading/positions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}'
import requests
url = "https://gateway.amana.io/trading/positions"
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
payload = {
"symbol": "<string>",
"side": "buy",
"type": "unit",
"amount": 123.45,
"sl": 123.45,
"tp": 123.45,
"price": 123.45,
"slAmount": 123.45,
"tpAmount": 123.45,
"comment": "<string>"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.json())
const response = await fetch('https://gateway.amana.io/trading/positions', {
method: 'POST',
headers: {"Authorization": "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({"symbol": "<string>", "side": "buy", "type": "unit", "amount": 123.45, "sl": 123.45, "tp": 123.45, "price": 123.45, "slAmount": 123.45, "tpAmount": 123.45, "comment": "<string>"}),
});
console.log(await response.json());
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"success": true,
"orderId": "<string>",
"err": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{}
Last modified on October 8, 2026
