Rate providers
On this page:
THE RATE PROVIDER OBJECT |
|
THE RATE PROVIDER DRIVER OBJECT |
|
GET[base]/rates |
|
GET[base]/rates/{providerId} |
|
POST[base]/rates |
|
PUT[base]/rates/{providerId} |
|
DELETE[base]/rates/{providerId} |
|
GET[base]/rates/{providerId}/drivers |
|
GET[base]/rates/{providerId}/drivers/{driverId} |
|
POST[base]/rates/{providerId}/drivers |
|
PUT[base]/rates/{providerId}/drivers/{driverId} |
|
DELETE[base]/rates/{providerId}/drivers/{driverId} |
|
GET[base]/rates/{providerId}/drivers/{driverId}/diagnostics |
The Rate provider object
This object provides the following data about a rate provider:
- rateId string
The rate identifier.
- name string
The rate provider name.
- priority integer
The rate provider priority based on which a provider is selected when multiple providers are configured.
- provider string
The rate provider identifier.
- createTime string
The date and time when the object has been created.
- updateTime string
The date and time when the object has been last updated.
- uuid string
The unique universal identifier of the object (if provided). Refer to Integrations for more information.
{
"rateId": "6006dda272f002519c3eb505",
"name": "CryptoCompare",
"priority": 1,
"provider": "cryptocompare",
"createTime": "2021-01-01T00:00:00+00:00",
"updateTime": "2021-01-01T00:00:00+00:00",
"uuid": null
}
The Rate provider driver object
This object provides the following data about a rate provider driver:
- driverId string
The driver identifier.
- driverNumber string
The driver number.
- address string
The rate provider address.
- name string
The driver name.
- provider string
The driver provider.
- version integer
The version of a driver.
- createTime string
The date and time when the object has been created.
- updateTime string
The date and time when the object has been last updated.
- uuid string
The unique universal identifier of the object (if provided). Refer to Integrations for more information.
{
"driverId": "6006dda272f002519c3eb505",
"driverNumber": "12345",
"address": "https://min-api.cryptocompare.com",
"name": "API",
"provider": "API",
"version": 2,
"createTime": "2021-01-01T00:00:00+00:00",
"updateTime": "2021-01-01T00:00:00+00:00",
"uuid": null
}
Get a rate providers list
Use this method to obtain a list of the rate providers.
To obtain detailed information about a specified rate provider, use a separate method to get rate provider details.
Request
Header parameters:
Authorization: Bearer <token>
Query parameters:
This method supports pagination and sorting. For details on applying the parameters, refer to the Query parameters section. Possible parameters for sorting are listed below. For values description, refer to the Rate provider object.
Possible values for the sort_by
parameter:
name
createTime
(default)priority
provider
rateId
updateTime
GET[base]/rates
curl --location --request GET 'https://your.base-url.here/rates?limit=10&offset=0&sort_by=createTime&sort_order=desc' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an array of Rate provider object providing information about all rate providers that correspond to the query parameters specified in the request.
Get rate provider details
Use this method to obtain detailed information about a specified rate provider.
To obtain a list of rate providers, use a separate method to get a list of rate providers.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- providerId required
The rate provider identifier.
GET[base]/rates/{provideId}
curl --location --request GET 'https://your.base-url.here/rates/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains a Rate provider object providing information about the specified rate provider.
Add a new rate provider
Use this method to add a new rate provider.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Body:
- drivers object
An array of objects specifying the drivers used to set up connection to a rate provider.
Expand fields- address string
The driver address.
- name string
The driver name.
- provider string
The service provider.
- version integer
The driver version.
- priority integer
The priority based on which a rate provider is selected when multiple rate providers are connected.
- provider string required
The rate provider identifier.
- name string
The rate provider name.
- uuid string
The unique universal identifier of the object. Refer to Integrations for more information.
POST[base]/rates
curl --location --request POST 'https://your.base-url.here/rates' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"provider": "cryptocompare",
"drivers": [
{
"address": "https://min-api.cryptocompare.com",
"name": "API",
"provider": "API",
"version": 2
}
],
"priority": 1,
"name": "CryptoCompare",
"uuid": null
}'
Response
Body:
In case of success, the response body contains a Rate provider object providing information about the newly created rate provider.
Update a rate provider
Use this method to update a specified rate provider.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Path parameters:
- providerId required
The rate provider identifier.
Body:
The values of the following fields can be updated:
- priority integer
The priority based on which a rate provider is selected when multiple rate providers are connected.
- name string
The rate provider name.
- uuid string
The unique universal identifier of the object. Refer to Integrations for more information.
PUT[base]/rates/{providerId}
curl --location --request PUT 'https://your.base-url.here/rates/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"priority": 1,
"name": "CryptoCompare",
"uuid": null
}'
Response
Body:
In case of success, the response body contains a Rate provider object providing information about the updated rate provider.
Delete a rate provider
Use this method to delete a specified rate provider.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- providerId required
The rate provider identifier.
DELETE[base]/rates/{providerId}
curl --location --request DELETE 'https://your.base-url.here/rates/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, no response body is returned.
Get a rate provider drivers list
Use this method to obtain a list of rate provider drivers.
To obtain detailed information about a specified rate provider driver, use a separate method to get rate provider driver details.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- providerId required
The rate provider identifier.
GET[base]/rates/{providerId}/drivers
curl --location --request GET 'https://your.base-url.here/rates/60ba407d15951453e60e49f8/drivers' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an array of Driver objects providing information about the rate provider drivers.
Get rate provider driver details
Use this method to obtain detailed information about a specified rate provider driver.
To obtain a list of rate provider drivers, use a separate method to get a list of rate provider drivers.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- providerId required
The rate provider identifier.
- driverId required
The rate provider driver identifier.
GET[base]/rates/{providerId}/drivers/{driverId}
curl --location --request GET 'https://your.base-url.here/rates/60ba407d15951453e60e49f8/drivers/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains a Driver object providing information about the specified rate provider drivers.
Add a new rate provider driver
Use this method to add a new rate provider driver.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Path parameters:
- providerId required
The rate provider identifier.
Body:
- address string
The rate provider address.
- credentials object
The credentials used to connect to a rate provider.
- name string
The driver name.
- provider string required
The driver identifier.
- version integer
The driver version.
- uuid string
The unique universal identifier of the object. Refer to Integrations for more information.
POST[base]/rates/{providerId}/drivers
curl --location --request POST 'https://your.base-url.here/rates/60ba407d15951453e60e49f8/drivers' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"provider": "API",
"address": "https://min-api.cryptocompare.com",
"credentials": {
"key": "ddwqdqwdjqwkdjqwkdjqwjdlqwkjdkqwldqw"
},
"name": "API",
"version": 2,
"uuid": null
}'
Response
Body:
In case of success, the response body contains a Driver object providing information about the newly created rate provider driver.
Update a rate provider driver
Use this method to update a specified rate provider driver.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Path parameters:
- providerId required
The rate provider identifier.
- driverId required
The rate provider driver identifier.
Body:
The values of the following fields can be updated:
- address string
The rate provider address.
- credentials object
The credentials used to connect to a rate provider.
- name string
The driver name.
- version integer
The driver version.
- uuid string
The unique universal identifier of the object. Refer to Integrations for more information.
PUT[base]/rates/{providerId}/drivers/{driverId}
curl --location --request PUT 'https://your.base-url.here/rates/60ba407d15951453e60e49f8/drivers/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"address": "https://min-api.cryptocompare.com",
"credentials": {
"key": "credentials"
},
"name": "API",
"version": 2,
"uuid": null
}'
Response
Body:
In case of success, the response body contains a Driver object providing information about the updated rate provider driver.
Delete a rate provider driver
Use this method to delete a specified rate provider driver.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- providerId required
The rate provider identifier.
- driverId required
The rate provider driver identifier.
DELETE[base]/rates/{providerId}/drivers/{driverId}
curl --location --request DELETE 'https://your.base-url.here/rates/60ba407d15951453e60e49f8/drivers/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, no response body is returned.
Run rate provider diagnostics
Use this method to run rate provider diagnostics.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- providerId required
The rate provider identifier.
- driverId required
The rate provider driver identifier.
GET[base]/rates/{providerId}/drivers/{driverId}/diagnostics
curl --location --request GET 'https://your.base-url.here/rates/60ba407d15951453e60e49f8/drivers/60ba407d15951453e60e49f8/diagnostics' \
--header 'Authorization: Bearer <token>'
Response
Body:
- health boolean
If
true
, the connection to a rate provider is alive. Iffalse
, diagnostics failed.- message string
If diagnostics failed, this field contains a problem description. If the connection to a rate provider is alive,
null
.
{
"health": true,
"message": null
}