pybotters.CoincheckPrivateDataStore

class pybotters.CoincheckPrivateDataStore

DataStoreCollection for Coincheck Private WebSocket API

Methods

__init__()

initialize(*aws)

Initialize DataStore from HTTP response data.

onmessage(msg[, ws])

WebSocket message handler.

wait()

DataStoreCollection の onmessage ハンドラが呼び出しされるまで待機します。

Attributes

execution

execution-events channel.

order

order-events channel.

property execution: Execution

execution-events channel.

https://coincheck.com/ja/documents/exchange/api#websocket-execution-events

async initialize(*aws: Awaitable[aiohttp.ClientResponse]) None

Initialize DataStore from HTTP response data.

Supported endpoints:

  • GET /api/exchange/orders/opens (coincheckPrivateDataStore.order)

property order: Order

order-events channel.

https://coincheck.com/ja/documents/exchange/api#websocket-order-events

Only active orders are stored. Completed and canceled orders are removed from the store.

The fields pending_amount and pending_market_buy_amount are added to each item to track pending orders.

警告

New-order events are not sent from the WebSocket, you should call Order.feed_response() to insert the response from POST /api/exchange/orders into the DataStore.

Order.feed_response(data: dict[str, Any]) None

Feed the response data from POST /api/exchange/orders into the DataStore.

The fields pending_amount and pending_market_buy_amount are added to each item to track pending orders.