Используется для подключения ботов/сторонних приложений. Создается пользователем, затем применяется в Headers запроса к graphqlUsed to connect bots/third party applications. Created by the user, then applied in the Headers of the graphql query:
Code Block |
---|
{ "Authorization": "Bearer ${api_key}" } |
Создание, просмотра перечня, удаление API KEY происходит через Creation, viewing of the list, deletion of API KEY occurs through the frontend.
Создать Create api_key:
description - задает пользователь, чтобы удобно ему было отличать один ключ от другого
expires - обязательное полеrequired field, содержит contains UNIX time окончания действия ключаscope - текстовое поле содержащее перечень сфер действия ключа через when the key expires
scope - a text field containing a list of the scope of the key with the separator “|” - по умолчанию “trading”. В дальнейшем планируется добавить другие by default “trading”. In the future it is planned to add other scopes
otp_code - если у пользователя включен 2FA - его необходимо запросить у пользователяcode 2FA
Code Block |
---|
mutation { createApiKey( description:String expires: Int scope: String otp_code:String ) { id token description scope expires } } |
ВниманиеAttention, поле token в ответе будет заполнено только один раз при создании ключа, в дальнейшем при получении списка ключей поле token в ответе будет всегда равен null.Получить список api_keythe token field in the response will be filled only once when creating a key; in the future, when receiving a list of keys, the token field in the response will always be null.
Get a list of api_keys
Code Block |
---|
query { apiKeys { id description scope expires } } |
Удалить Remove api_key
Code Block |
---|
mutation { deleteApiKey(id:String, otp_code:String) } |
...