Bybit¶
Integration adapter for the Bybit exchange.
- class BybitDataClientConfig¶
Bases:
objectConfiguration for the Bybit live data client.
- bars_timestamp_on_close¶
- base_url_http¶
- base_url_ws_private¶
- base_url_ws_public¶
- book_snapshot_timeout_secs¶
- environment¶
- has_proxy_url¶
- heartbeat_interval_secs¶
- http_timeout_secs¶
- instrument_status_poll_secs¶
- max_retries¶
- product_types¶
- recv_window_ms¶
- retry_delay_initial_ms¶
- retry_delay_max_ms¶
- transport_backend¶
- update_instruments_interval_mins¶
- class BybitEnvironment¶
Bases:
objectEnvironments supported by the Bybit API stack.
- DEMO = <BybitEnvironment.Demo: 1>¶
- MAINNET = <BybitEnvironment.Mainnet: 0>¶
- TESTNET = <BybitEnvironment.Testnet: 2>¶
- classmethod from_str(data)¶
- name¶
- value¶
- static variants()¶
- class BybitExecutionClientConfig¶
Bases:
objectConfiguration for the Bybit live execution client.
- account_id¶
- auth_timeout_secs¶
- auto_repay_spot_borrows¶
- base_url_http¶
- base_url_ws_private¶
- base_url_ws_trade¶
- environment¶
- has_proxy_url¶
- heartbeat_interval_secs¶
- http_timeout_secs¶
- margin_mode¶
- max_retries¶
- product_types¶
- recv_window_ms¶
- retry_delay_initial_ms¶
- retry_delay_max_ms¶
- smp_type¶
- transport_backend¶
- use_spot_position_reports¶
- class BybitExecutionClientFactory¶
Bases:
objectFactory for creating Bybit execution clients.
- name()¶
- class BybitLiquidation¶
Bases:
objectBybit public liquidation from the allLiquidation WebSocket stream.
Bybit publishes this stream for linear and inverse contracts only.
- bankruptcy_price¶
- classmethod decode_record_batch_py(metadata, py_batch)¶
Decodes a PyArrow RecordBatch into custom data instances.
- encode_record_batch_py(items)¶
Encodes custom data instances into a PyArrow RecordBatch.
- classmethod from_json(data)¶
- instrument_id¶
- position_side¶
- quantity¶
- to_json()¶
- ts_event¶
- ts_init¶
- class BybitMarginAction¶
Bases:
objectMargin actions for spot margin trading operations.
- BORROW = <BybitMarginAction.borrow: 'borrow'>¶
- GET_BORROW_AMOUNT = <BybitMarginAction.get_borrow_amount: 'get_borrow_amount'>¶
- REPAY = <BybitMarginAction.repay: 'repay'>¶
- classmethod from_str(data)¶
- name¶
- value¶
- static variants()¶
- class BybitMarginBorrowResult¶
Bases:
objectResult from a Bybit borrow operation for strategy consumption.
- amount¶
- coin¶
- message¶
- success¶
- ts_event¶
- ts_init¶
- class BybitMarginRepayResult¶
Bases:
objectResult from a Bybit repay operation for strategy consumption.
- amount¶
- coin¶
- message¶
- result_status¶
- success¶
- ts_event¶
- ts_init¶
- class BybitMarginStatusResult¶
Bases:
objectResult with current borrowed amount on Bybit.
- borrow_amount¶
- coin¶
- ts_event¶
- ts_init¶
- class BybitPositionIdx¶
Bases:
objectPosition index values used for hedge mode payloads.
- BUY_HEDGE = <BybitPositionIdx.BUY_HEDGE: 1>¶
- ONE_WAY = <BybitPositionIdx.ONE_WAY: 0>¶
- SELL_HEDGE = <BybitPositionIdx.SELL_HEDGE: 2>¶
- classmethod from_str(data)¶
- name¶
- value¶
- static variants()¶
- class BybitPositionMode¶
Bases:
objectPosition mode as returned by the v5 API.
- BOTH_SIDES = <BybitPositionMode.BOTH_SIDES: 3>¶
- MERGED_SINGLE = <BybitPositionMode.MERGED_SINGLE: 0>¶
- classmethod from_str(data)¶
- name¶
- value¶
- static variants()¶
- class BybitProductType¶
Bases:
objectProduct categories supported by the v5 API.
- INVERSE = <BybitProductType.Inverse: 'inverse'>¶
- LINEAR = <BybitProductType.Linear: 'linear'>¶
- OPTION = <BybitProductType.Option: 'option'>¶
- SPOT = <BybitProductType.Spot: 'spot'>¶
- classmethod from_str(data)¶
- name¶
- value¶
- static variants()¶
- class BybitTickerData¶
Bases:
objectUnified ticker data structure containing common fields across all product types.
This simplified ticker structure is designed to work across SPOT, LINEAR, and OPTION products, containing only the most commonly used fields.
- ask1_price¶
- ask1_size¶
- bid1_price¶
- bid1_size¶
- funding_rate¶
- high_price24h¶
- index_price¶
- last_price¶
- low_price24h¶
- mark_price¶
- next_funding_time¶
- open_interest¶
- symbol¶
- turnover24h¶
- volume24h¶