All API calls in this section concern operations with assets and symbols.
All URLs for the API calls described below are relative to https://HOST:PORT/v2
. The value of HOST:PORT
is provided during the onboarding process by Spotware’s service assurance team.
HTTP Method | URL |
---|---|
GET |
/webserv/symbols |
Gets the list of all available symbols on the server.
Parameters
No parameters.
Request Body
No request body.
Output
Key | Data Type | Description |
---|---|---|
symbol |
array | An array of symbol objects; click here to see the JSON schema of a symbol. |
symbol.name |
string | The name of a symbol. |
symbol.id |
integer | The ID of a symbol. |
symbol.description |
string | A custom string describing a symbol. |
symbol.assetClass |
string | The name of the asset class to which a symbol belongs to. |
symbol.category |
string | The name of the symbol category to which a symbol belongs to. |
symbol.quotesEnabled |
boolean | The flag that determines whether a symbol is currently receiving quotes. |
symbol.showInCtrader |
boolean | The flag that determines whether a symbol is currently shown in cTrader applications. |
Request Example
curl -X GET "https://HOST:PORT/v2/webserv/symbols?token=1dd4ef40-c5b3-61c0-0689-b1b40c97fadc" -H "Accept: application/json"
Response Example
{
"symbol":[
{
"name":"EURUSD",
"id":1,
"description":"EUR to USD",
"assetClass":"forex",
"category":"majors",
"quotesEnabled":true,
"showInCtrader":false
},
{
"name":"BTCUSD",
"id":2,
"description": "BTC to USD",
"assetClass":"crypto",
"category":"majors",
"quotesEnabled":true,
"showInCtrader":true
},
{
"name":"XAUUSD",
"id":3,
"description":"Gold",
"assetClass":"commodities",
"category":"metals",
"quotesEnabled":false,
"showInCtrader":false
},
]
}
Expected Status Code
200
HTTP Method | URL |
---|---|
GET |
/webserv/depositAssets |
Gets the list of all assets available as account deposit assets.
Parameters
No parameters.
Request Body
No request body.
Output
Key | Data Type | Description |
---|---|---|
depositAsset |
array | An array containing the names of all available deposit assets. |
Request Example
curl -X GET "https://HOST:PORT/v2/webserv/depositAssets?token=1dd4ef40-c5b3-61c0-0689-b1b40c97fadc" -H "Accept: application/json"
Response Example
{
"depositAsset":[
"EUR",
"USD",
"GBP"
]
}
Expected Status Code
200