Expand description
Request and response models of the REST endpoints used by the connectors.
Bybit writes every number as a text ("81695.30") and an absent number as an empty text. The readers here take
either, keep the digits as written (an exact decimal, never a float) and turn the empty text into zero or None.
Fields the connectors do not use are not modelled: the reply may carry more.
Structs§
- Amend
Order Request - The body of
POST /v5/order/amend: the order is named byorderIdororderLinkId, the fields set are changed. - Cancel
AllResult - The answer to
cancel-all. - Cancel
Order Request - The body of
POST /v5/order/cancel. - Coin
Balance - One coin of a wallet.
- Create
Order Request - The body of
POST /v5/order/create. Only the fields that are set are sent. - Envelope
- The envelope of every REST reply.
- Execution
Record - A fill (
/v5/execution/list, and theexecutionstream). - Instrument
Info - One instrument of
/v5/market/instruments-info. - Kline
- One candle: the open time and the prices, from the list of
/v5/market/kline. - Kline
Result - The result of
/v5/market/kline: the rows are the newest first. - Level
- One level of an order book: price and size.
- LotSize
Filter - The size rules of an instrument.
- Order
Book Result - The order book of
/v5/market/orderbook. - Order
Record - An order as the exchange lists it (
/v5/order/realtime,/v5/order/history, and theorderstream). - Order
Ref - The answer to a command on one order: the number and the client id.
- Page
- A page of a list with a cursor. The list is empty and the cursor empty at the end.
- Position
Record - A position of
/v5/position/listor of thepositionstream. - Price
Filter - The price rules of an instrument.
- Public
Trade Record - One trade of
/v5/market/recent-trade. - Server
Time - The server time (
/v5/market/time). - Ticker
- One ticker of
/v5/market/tickers. - Wallet
Record - A wallet:
/v5/account/wallet-balanceand thewalletstream.
Functions§
- dec
- A decimal from a JSON text or number. The empty text is zero.
- int
- An integer from a JSON text or number. The empty text,
nulland an absent field are zero. - opt_dec
- A decimal from a JSON text or number. The empty text,
nulland an absent field areNone. - ser_dec
- Writes a decimal as a JSON text, the way the API wants numbers in a request.