Endpoints
The RESTful API endpoints to test your custom clients or programs.
SyncState
At this endpoint we sync our backend systems with our clients.
https://sandbox.20pip.com/sync
Request
headers:{
Authorization: [ACCESS_TOKEN]
}
Response
{
"res": 0,
"token": 5649847982,
"reply": 123456789,
"order": 1213214545,
"volume": 0.03,
"symbol": "XAUUSD",
"cmd": 0,
"e": 2020,
"e2": 2018,
"sl": 2002,
"tp": 2030,
"tp2": 2040,
"tp3": 2050,
}
Schema
{
"res":{
"type":"integer",
"format":"int8",
"description":"Result of the operation, command, or request"
},
"token":{
"type":"integer",
"format":"unsigned int64 (ulong)",
"description":"Unique token across all system for trade"
},
"reply":{
"type":"integer",
"format":"unsigned int64 (ulong)",
"description":"(If exists) Parent trade unique token"
},
"order":{
"type":"integer",
"format":"unsigned int64 (ulong)",
"description":"The trading platform ticket order number"
},
"volume":{
"type":"number",
"format":"double",
"description":"The volume (size) of the operation, command, or request"
},
"symbol":{
"type":"string",
"description":"The symbol of asset, in other words pair."
},
"cmd":{
"type":"integer",
"format":"int8",
"values":[
{
"cmd":0,
"description":"Official BUY order"
},
{
"cmd":1,
"description":"Official SELL order"
},
{
"cmd":2,
"description":"Official BUY_LIMIT order"
},
{
"cmd":3,
"description":"Official SELL_LIMIT order"
},
{
"cmd":4,
"description":"Close all positions"
},
{
"cmd":5,
"description":"BUY order with two entry point"
},
{
"cmd":6,
"description":"SELL order with two entry point"
},
{
"cmd":7,
"description":"Close half of positions (two entry points) and risk free last one"
},
{
"cmd":8,
"description":"Risk free the position"
}
]
}
}