Widgets
Use these methods to manage widgets as well as tickers and ticker symbols added to them.
GET[host]/api/v2/widgets |
|
GET[host]/api/v2/widgets/{widgetId} |
|
PUT[host]/api/v2/widgets/{widgetId} PATCH[host]/api/v2/widgets/{widgetId} |
GET[host]/api/v2/widgets/tickers |
|
GET[host]/api/v2/widgets/tickers/{tickerId} |
GET[host]/api/v2/widgets/tickers/{tickerId}/symbols |
|
GET[host]/api/v2/widgets/tickers/{tickerId}/symbols/{symbolId} |
|
POST[host]/api/v2/widgets/tickers/{tickerId}/symbols |
|
DELETE[host]/api/v2/widgets/tickers/{tickerId}/symbols/{symbolId} |
Get a list of widgets
Use this method to obtain a list of widgets configured in the Back Office.
To obtain detailed information about a specific widget, use a separate method to get widget details.
Request
Header parameters:
Authorization: Bearer <access_token>
GET[host]/api/v2/widgets
curl --location --request GET 'https://host.name/api/v2/widgets?limit=10&offset=0' \
--header 'Authorization: Bearer <token>'
Response
A response contains an array of Widget objects providing information about the available widgets.
Get widget details
Use this method to obtain detailed information about a specific widget.
To obtain a full list of configured widgets, use a separate method to get a widgets list.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- widgetId required
The widget identifier.
GET[host]/api/v2/widgets/{widgetId}
curl --location --request GET 'https://host.name/api/v2/widgets/1' \
--header 'Authorization: Bearer <token>'
Response
A response contains a Widget object providing information about a specified widget.
Update a widget
Use this method to update a specified widget.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters
- widgetId required
The widget identifier.
Body:
The following field values can be updated for a specified widget:
- width integer
The widget width, in points.
- height integer
The widget height, in points.
- positionX integer
The
X
coordinate of the upper-right corner of a widget.- positionY integer
The
Y
coordinate of the upper-right corner of a widget.- source string
The URL of a data source streaming data for updating tickers.
- platform string
The trading platform for which data is displayed.
- currencies string
The currency pair symbol (such as
BTCUSD
).
PUT[host]/api/v2/widgets/{widgetId}
curl --location --request PUT 'https://host.name/api/v2/widgets/1' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"width": 20,
"height": 20,
"positionX": 20,
"positionY": 20,
"source": "https://example.website.org",
"platform": "mt4",
"currencies": "EURUSD"
}'
Response
A response includes a Widget object providing information about the updated widget.
Get a list of tickers
Use this method to obtain a list of tickers added to the Ticker Widget.
To obtain detailed information about a specific ticker, use a separate method to get ticker details.
Request
Header parameters:
Authorization: Bearer <access_token>
GET[host]/api/v2/widgets/tickers
curl --location --request GET 'https://host.name/api/v2/widgets/tickers?limit=10&offset=0' \
--header 'Authorization: Bearer <token>'
Response
A response includes the following data about tickers added to the Ticker Widget:
- id integer
The ticker identifier.
- platform string
The trading platform for which data is displayed.
- source string
The URL of a data source streaming data for updating tickers.
- symbols object or null
An array of objects providing data about ticker symbols.
{
"id": 1,
"platform": "mt4",
"source": "https://example.website.org",
"symbols": [
{
"id": 1,
"show": true,
"symbol": "EURUSD"
},
{
"id": 2,
"show": true,
"symbol": "BTCUSD"
}
]
}
Get ticker details
Use this method to obtain detailed information about a specific ticker added to the Ticker Widget.
To obtain a full list of tickers added to the widget, use a separate method to get a tickers list.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- tickerId required
The ticker identifier.
GET[host]/api/v2/widgets/tickers/{tickerId}
curl --location --request GET 'https://host.name/api/v2/widgets/tickers/1' \
--header 'Authorization: Bearer <token>'
Response
A response includes the following data about a specified ticker:
- id integer
The ticker identifier.
- platform string
The trading platform for which data is displayed.
- source string
The URL of a data source streaming data for updating tickets.
- symbols object or null
An array of objects providing data about ticker symbols.
{
"id": 1,
"platform": "mt4",
"source": "https://example.website.org",
"symbols": [
{
"id": 1,
"show": true,
"symbol": "EURUSD"
},
{
"id": 2,
"show": true,
"symbol": "BTCUSD"
}
]
}
Get a list of ticker symbols
Use this method to obtain a list of symbols specified for tickers added to the Ticker Widget.
To obtain detailed information about a specific ticker symbol, use a separate method to get ticker symbol details.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters
- tickerID required
The ticker identifier.
GET[host]/api/v2/widgets/tickers/{tickerId}/symbols
curl --location --request GET 'https://host.name/api/v2/widgets/tickers/1/symbols?limit=10&offset=0' \
--header 'Authorization: Bearer <token>'
Response
A response includes the following data about each ticker symbol:
- id integer
The ticker symbol identifier.
- show boolean
If
true
, a ticker symbol is displayed in a widget by default.If
false
, a ticker symbol can be selected from a list and added to a widget.
- symbol string
The currency pair symbol.
{
"id": 1,
"show": true,
"symbol": "EURUSD"
}
Get ticker symbol details
Use this method to obtain detailed information about a specific ticker symbol.
To obtain a list of available ticker symbols, use a separate method to get a ticker symbols list.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters
- tickerId required
The ticker identifier.
- symbolId required
The symbol identifier.
GET[host]/api/v2/widgets/tickers/{tickerId}/symbols/{symbolId}
curl --location --request GET 'https://host.name/api/v2/widgets/tickers/1/symbols/1' \
--header 'Authorization: Bearer <token>'
Response
A response includes the following data about a specified ticker symbol:
- id integer
The ticker symbol identifier.
- show boolean
If
true
, a ticker symbol is displayed in a widget by default.If
false
, a ticker symbol can be selected from a list and added to a widget.
- symbol string
The currency pair symbol.
{
"id": 1,
"show": true,
"symbol": "EURUSD"
}
Add a new ticker symbol
Use this method to add a new ticker symbol to be displayed in the Ticker Widget.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters
- tickerId required
The ticker identifier.
Body:
Specify the following parameters for a new ticker symbol:
- symbol string required
The currency pair symbol.
- show boolean
If
true
, a ticker symbol is displayed in a widget by default.If
false
, a ticker symbol can be selected from a list and added to a widget.
POST[host]/api/v2/widgets/tickers/{tickerId}/symbols/
curl --location --request POST 'https://host.name/api/v2/widgets/tickers/1/symbols' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"symbol": "EURUSD",
"show": true
}'
Response
A response includes the following data about the added ticker symbol:
- id integer
The ticker symbol identifier.
- show boolean
If
true
, a ticker symbol is displayed in a widget by default.If
false
, a ticker symbol can be selected from a list and added to a widget.
- symbol string
The currency pair symbol.
{
"id": 1,
"show": true,
"symbol": "EURUSD"
}
Delete a ticker symbol
Use this method to delete a ticker symbol.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- tickerID required
The ticker identifier.
- symbolID required
The symbol identifier.
DELETE[host]/api/v2/widgets/tickers/{tickerId}/symbols/{symbolId}
curl --location --request DELETE 'https://host.name/api/v2/widgets/tickers/1/symbols/1' \
--header 'Authorization: Bearer <token>'
Response
In case of success, no response body is returned.