curl --request POST \
--url 'https://gateway.amana.io/trading/positions/limit' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "<string>",
"side": "buy",
"amount": 123.45,
"price": 123.45,
"sl": 123.45,
"tp": 123.45,
"comment": "<string>"
}'
import requests
url = "https://gateway.amana.io/trading/positions/limit"
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
payload = {
"symbol": "<string>",
"side": "buy",
"amount": 123.45,
"price": 123.45,
"sl": 123.45,
"tp": 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/limit', {
method: 'POST',
headers: {"Authorization": "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({"symbol": "<string>", "side": "buy", "amount": 123.45, "price": 123.45, "sl": 123.45, "tp": 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 a limit order
Place a pending order that opens a position only when the market reaches your price.
POST
/
trading
/
positions
/
limit
curl --request POST \
--url 'https://gateway.amana.io/trading/positions/limit' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "<string>",
"side": "buy",
"amount": 123.45,
"price": 123.45,
"sl": 123.45,
"tp": 123.45,
"comment": "<string>"
}'
import requests
url = "https://gateway.amana.io/trading/positions/limit"
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
payload = {
"symbol": "<string>",
"side": "buy",
"amount": 123.45,
"price": 123.45,
"sl": 123.45,
"tp": 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/limit', {
method: 'POST',
headers: {"Authorization": "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({"symbol": "<string>", "side": "buy", "amount": 123.45, "price": 123.45, "sl": 123.45, "tp": 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
string
required
Trading symbol, for example XAUUSD, EURUSD, or AAPL.
enum<string>
required
Trade direction. Use ‘buy’ to go long, ‘sell’ to go short.Available options:
buy, sellnumber
required
Trade size in account currency (USD). For example, 1000 means $1,000 worth of the instrument.Minimum:
0number
required
Price at which the order should trigger. The order stays pending until the market reaches this level.Minimum:
0number
Optional stop loss price level. The position closes automatically if the market hits this price.Minimum:
0number
Optional take profit price level. The position closes automatically in profit if the market hits this price.Minimum:
0string
Optional comment or note for the order.
Response
200 Success.
boolean
string
string
string
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/limit' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "<string>",
"side": "buy",
"amount": 123.45,
"price": 123.45,
"sl": 123.45,
"tp": 123.45,
"comment": "<string>"
}'
import requests
url = "https://gateway.amana.io/trading/positions/limit"
headers = {"Authorization": "Bearer <token>", "Content-Type": "application/json"}
payload = {
"symbol": "<string>",
"side": "buy",
"amount": 123.45,
"price": 123.45,
"sl": 123.45,
"tp": 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/limit', {
method: 'POST',
headers: {"Authorization": "Bearer <token>", "Content-Type": "application/json"},
body: JSON.stringify({"symbol": "<string>", "side": "buy", "amount": 123.45, "price": 123.45, "sl": 123.45, "tp": 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
