Websockets

Websockets

  • Базовый URL вебсокета: wss://alfabit.org/stream

  • Пользователи могут прослушивать несколько вебсокетов.

Курсы

Подключение к сокету курсов

HTTP Request

wss://alfabit.org/stream/rates/?transport=websocket

Пример ответа:

["monitor",{"null_value":4841.8015,"correct_value":4740.524740520001,"time":1681197828627,"next":1681197848627,"type":"monitoring","duration":20,"state":true,"rate_type":"operation","rate_value":4711.861000000001,"min_reserv_competitor":1,"money1_best_code":"DASH","money2_best_code":"TEST","step":0.0001,"monitoring_type":"greed","api_client":"alfabit","use_greed_type":"general","use_step_type":"general","use_position_type":"general","correct_type":"decrease","value":4740.524740520001,"text":"text","action":"end_correction","money1":"DASH","money2":"TEST"}]
["monitor",{"null_value":4841.8015,"correct_value":4740.4863404816,"time":1681197828627,"next":1681197848627,"type":"monitoring","duration":20,"state":true,"rate_type":"operation","rate_value":4711.861000000001,"min_reserv_competitor":1,"money1_best_code":"DASH","money2_best_code":"TEST","step":0.0001,"monitoring_type":"greed","api_client":"alfabit","use_greed_type":"general","use_step_type":"general","use_position_type":"general","correct_type":"decrease","value":4740.4863404816,"text":"text","action":"end_correction","money1":"DASH","money2":"TEST"}]
["monitor",{"null_value":104.1875,"correct_value":103.34580334569999,"time":1681197828627,"next":1681197848627,"type":"monitoring","duration":20,"state":true,"rate_type":"operation","rate_value":101.4706,"min_reserv_competitor":1,"money1_best_code":"EOS","money2_best_code":"TEST","step":0.0001,"monitoring_type":"greed","api_client":"alfabit","use_greed_type":"general","use_step_type":"general","use_position_type":"general","correct_type":"decrease","value":103.34580334569999,"text":"text","action":"end_correction","money1":"EOS","money2":"TEST"}]
["monitor",{"null_value":270.13734999999997,"correct_value":268.7810687808,"time":1681197828627,"next":1681197848627,"type":"monitoring","duration":20,"state":true,"rate_type":"operation","rate_value":262.48530000000005,"min_reserv_competitor":1,"money1_best_code":"QTUM","money2_best_code":"TEST","step":0.0001,"monitoring_type":"greed","api_client":"alfabit","use_greed_type":"general","use_step_type":"general","use_position_type":"general","correct_type":"decrease","value":268.7810687808,"text":"text","action":"end_correction","money1":"QTUM","money2":"TEST"}]

Статус заказа

Подключение к сокету статуса заказа

HTTP Request

wss://alfabit.org/stream/order/status/{order_id}?transport=websocket

Параметры запроса

ПараметрОбязательныйОписание

order_id

да

Уникальный идентификатор заказа

Last updated