diff --git a/docs/v5/account/borrow.mdx b/docs/v5/account/borrow.mdx
index a504625c2d..604763e1f1 100644
--- a/docs/v5/account/borrow.mdx
+++ b/docs/v5/account/borrow.mdx
@@ -47,6 +47,16 @@ Content-Type: application/json
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.borrow(
+ coin="BTC",
+ amount="0.01"
+))
```
diff --git a/docs/v5/account/dcp-info.mdx b/docs/v5/account/dcp-info.mdx
index 6be343ba9f..264e5e0839 100644
--- a/docs/v5/account/dcp-info.mdx
+++ b/docs/v5/account/dcp-info.mdx
@@ -43,6 +43,20 @@ X-BAPI-RECV-WINDOW: 5000
```
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.query_dcp_info())
+```
+
+
+
```n4js
diff --git a/docs/v5/account/instrument.mdx b/docs/v5/account/instrument.mdx
index d2fe6e4ba5..24b86ff26d 100644
--- a/docs/v5/account/instrument.mdx
+++ b/docs/v5/account/instrument.mdx
@@ -301,6 +301,23 @@ Host: api-testnet.bybit.com
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_account_instruments_info(
+ category="linear",
+ symbol="BTCUSDT"
+))
+```
+
+
+
@@ -317,6 +334,23 @@ GET /v5/account/instruments-info?category=spot&symbol=BTCUSDT HTTP/1.1
Host: api-testnet.bybit.com
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_account_instruments_info(
+ category="spot",
+ symbol="MNTUSDT"
+))
+```
+
diff --git a/docs/v5/account/no-convert-repay.mdx b/docs/v5/account/no-convert-repay.mdx
index d47152a9e5..f92dcc1438 100644
--- a/docs/v5/account/no-convert-repay.mdx
+++ b/docs/v5/account/no-convert-repay.mdx
@@ -54,6 +54,16 @@ Content-Type: application/json
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.set_no_convert_repay(
+ coin="BTC",
+ amount="0.01"
+))
```
diff --git a/docs/v5/account/repay-liability.mdx b/docs/v5/account/repay-liability.mdx
index 27bbf1a22c..baff147634 100644
--- a/docs/v5/account/repay-liability.mdx
+++ b/docs/v5/account/repay-liability.mdx
@@ -52,7 +52,15 @@ Content-Length: 22
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.repay_liability(
+ coin="USDT"
+))
```
diff --git a/docs/v5/account/repay.mdx b/docs/v5/account/repay.mdx
index b24db18669..949e7ffd23 100644
--- a/docs/v5/account/repay.mdx
+++ b/docs/v5/account/repay.mdx
@@ -57,6 +57,16 @@ Content-Type: application/json
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.repay(
+ coin="BTC",
+ amount="0.01"
+))
```
diff --git a/docs/v5/account/set-delta-mode.mdx b/docs/v5/account/set-delta-mode.mdx
index 73d9e03163..453b00a5a9 100644
--- a/docs/v5/account/set-delta-mode.mdx
+++ b/docs/v5/account/set-delta-mode.mdx
@@ -43,11 +43,20 @@ Content-Length: 20
}
```
+
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.set_delta_mode(
+ deltaEnable="1"
+))
```
diff --git a/docs/v5/account/set-spot-hedge.mdx b/docs/v5/account/set-spot-hedge.mdx
index e37ebb4ff8..6231174f6e 100644
--- a/docs/v5/account/set-spot-hedge.mdx
+++ b/docs/v5/account/set-spot-hedge.mdx
@@ -47,7 +47,15 @@ Content-Length: 31
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.set_hedging_mode(
+ setHedgingMode="OFF"
+))
```
diff --git a/docs/v5/account/smp-group.mdx b/docs/v5/account/smp-group.mdx
index d6bd98c249..2617e542c6 100644
--- a/docs/v5/account/smp-group.mdx
+++ b/docs/v5/account/smp-group.mdx
@@ -34,7 +34,13 @@ X-BAPI-RECV-WINDOW: 5000
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_smp_group())
```
diff --git a/docs/v5/account/unified-trans-amnt.mdx b/docs/v5/account/unified-trans-amnt.mdx
index 91abd5e1af..c92e2726ad 100644
--- a/docs/v5/account/unified-trans-amnt.mdx
+++ b/docs/v5/account/unified-trans-amnt.mdx
@@ -47,7 +47,15 @@ Content-Type: application/json
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_transferable_amount(
+ coinName="BTC,SOL,ETH,XRP"
+))
```
diff --git a/docs/v5/asset/balance/asset-overview.mdx b/docs/v5/asset/balance/asset-overview.mdx
index 12a6643251..fe2c285579 100644
--- a/docs/v5/asset/balance/asset-overview.mdx
+++ b/docs/v5/asset/balance/asset-overview.mdx
@@ -57,6 +57,13 @@ X-BAPI-RECV-WINDOW: 5000
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_asset_overview())
```
diff --git a/docs/v5/asset/fiat-convert/balance-query.mdx b/docs/v5/asset/fiat-convert/balance-query.mdx
index 605c9ff8bf..e635eef66c 100644
--- a/docs/v5/asset/fiat-convert/balance-query.mdx
+++ b/docs/v5/asset/fiat-convert/balance-query.mdx
@@ -37,6 +37,20 @@ X-BAPI-RECV-WINDOW: 5000
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_fiat_balance())
+```
+
+
+
### Response Example
diff --git a/docs/v5/asset/fiat-convert/confirm-quote.mdx b/docs/v5/asset/fiat-convert/confirm-quote.mdx
index b2d01e95c5..34f9360798 100644
--- a/docs/v5/asset/fiat-convert/confirm-quote.mdx
+++ b/docs/v5/asset/fiat-convert/confirm-quote.mdx
@@ -49,6 +49,23 @@ Content-Length: 52
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.confirm_a_quote_fiat_convert(
+ quoteTxId="QuoteTaxId123456",
+ subUserId="43456"
+))
+```
+
+
+
### Response Example
diff --git a/docs/v5/asset/fiat-convert/query-coin-list.mdx b/docs/v5/asset/fiat-convert/query-coin-list.mdx
index 6514911375..d59b8725ce 100644
--- a/docs/v5/asset/fiat-convert/query-coin-list.mdx
+++ b/docs/v5/asset/fiat-convert/query-coin-list.mdx
@@ -12,7 +12,7 @@ GET `/v5/fiat/query-coin-list`
### Request Parameters
| Parameter | Required | Type | Comments|
|:----- |:-------|:-----|------ |
-|side |false |integer |`0`: buy, buy crypto sell fiat; `1`: sell, sell crypto buy fiat|
+|side |false |string |`0`: buy, buy crypto sell fiat; `1`: sell, sell crypto buy fiat|
### Response Parameters
| Parameter | Type | Comments|
@@ -51,6 +51,23 @@ X-BAPI-TIMESTAMP: 1720064061248
X-BAPI-RECV-WINDOW: 5000
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_fiat_trading_pair_list(
+ side="0"
+))
+```
+
+
+
### Response Example
diff --git a/docs/v5/asset/fiat-convert/query-trade-history.mdx b/docs/v5/asset/fiat-convert/query-trade-history.mdx
index d26ed5628f..e71b6b40e3 100644
--- a/docs/v5/asset/fiat-convert/query-trade-history.mdx
+++ b/docs/v5/asset/fiat-convert/query-trade-history.mdx
@@ -49,6 +49,20 @@ X-BAPI-RECV-WINDOW: 5000
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_fiat_convert_history())
+```
+
+
+
### Response Example
diff --git a/docs/v5/asset/fiat-convert/query-trade.mdx b/docs/v5/asset/fiat-convert/query-trade.mdx
index 6fce4d5a3a..4fdf15b7fa 100644
--- a/docs/v5/asset/fiat-convert/query-trade.mdx
+++ b/docs/v5/asset/fiat-convert/query-trade.mdx
@@ -47,6 +47,22 @@ X-BAPI-RECV-WINDOW: 5000
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_fiat_convert_status(
+ tradeNo="TradeNo123456"
+))
+```
+
+
+
### Response Example
diff --git a/docs/v5/asset/fiat-convert/quote-apply.mdx b/docs/v5/asset/fiat-convert/quote-apply.mdx
index 35392c547e..e6ed531ea3 100644
--- a/docs/v5/asset/fiat-convert/quote-apply.mdx
+++ b/docs/v5/asset/fiat-convert/quote-apply.mdx
@@ -60,6 +60,26 @@ Content-Length: 172
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.request_a_quote_fiat_convert(
+ fromCoin="ETH",
+ fromCoinType="crypto",
+ toCoin="BTC",
+ toCoinType="crypto",
+ requestAmount="0.1"
+))
+```
+
+
+
### Response Example
diff --git a/docs/v5/asset/fiat-convert/reference-price.mdx b/docs/v5/asset/fiat-convert/reference-price.mdx
index 8cf508f93f..89dae7886f 100644
--- a/docs/v5/asset/fiat-convert/reference-price.mdx
+++ b/docs/v5/asset/fiat-convert/reference-price.mdx
@@ -43,6 +43,22 @@ X-BAPI-RECV-WINDOW: 5000
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_fiat_reference_price(
+ symbol="EUR-USDT"
+))
+```
+
+
+
### Response Example
diff --git a/docs/v5/asset/fund-history.mdx b/docs/v5/asset/fund-history.mdx
index cb01343f64..d0112280e6 100644
--- a/docs/v5/asset/fund-history.mdx
+++ b/docs/v5/asset/fund-history.mdx
@@ -52,6 +52,15 @@ X-BAPI-RECV-WINDOW: 5000
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_asset_overview(
+ limit=1
+))
```
diff --git a/docs/v5/asset/withdraw/vasp-list.mdx b/docs/v5/asset/withdraw/vasp-list.mdx
index 0bb3cca544..b95287157e 100644
--- a/docs/v5/asset/withdraw/vasp-list.mdx
+++ b/docs/v5/asset/withdraw/vasp-list.mdx
@@ -37,7 +37,13 @@ X-BAPI-SIGN: XXXXXX
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_exchange_entity_list())
```
diff --git a/docs/v5/broker/exchange-broker/rate-limit/query-all.mdx b/docs/v5/broker/exchange-broker/rate-limit/query-all.mdx
index a648f233ae..27a019152d 100644
--- a/docs/v5/broker/exchange-broker/rate-limit/query-all.mdx
+++ b/docs/v5/broker/exchange-broker/rate-limit/query-all.mdx
@@ -32,6 +32,10 @@ GET `/v5/broker/apilimit/query-all`
|> rate |integer|API Rate limit per second |
### Request Example
+
+
+
+
```http
GET /v5/broker/apilimit/query-all HTTP/1.1
Host: api.bybit.com
@@ -43,6 +47,30 @@ Content-Type: application/json
Content-Length: 2
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_broker_all_rate_limits())
+```
+
+
+
+
+
+```n4js
+
+```
+
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/broker/exchange-broker/rate-limit/query-cap.mdx b/docs/v5/broker/exchange-broker/rate-limit/query-cap.mdx
index d398e6123e..2e19ec055e 100644
--- a/docs/v5/broker/exchange-broker/rate-limit/query-cap.mdx
+++ b/docs/v5/broker/exchange-broker/rate-limit/query-cap.mdx
@@ -29,6 +29,9 @@ None
|> uidCap |string|UID-level API rate limit per second |
### Request Example
+
+
+
```http
GET /v5/broker/apilimit/query-cap HTTP/1.1
Host: api.bybit.com
@@ -40,6 +43,30 @@ Content-Type: application/json
Content-Length: 2
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_broker_rate_limit_cap())
+```
+
+
+
+
+
+```n4js
+
+```
+
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/broker/exchange-broker/rate-limit/set.mdx b/docs/v5/broker/exchange-broker/rate-limit/set.mdx
index 8e74cb1142..d8cff73c3e 100644
--- a/docs/v5/broker/exchange-broker/rate-limit/set.mdx
+++ b/docs/v5/broker/exchange-broker/rate-limit/set.mdx
@@ -34,6 +34,10 @@ POST `/v5/broker/apilimit/set`
|> [msg](/v5/enum#msg) |string|Result message |
### Request Example
+
+
+
+
```http
POST /v5/broker/apilimit/set HTTP/1.1
Host: api.bybit.com
@@ -54,6 +58,37 @@ Content-Type: application/json
}
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.set_broker_rate_limit(
+ list=[
+ {
+ "uids": "290118",
+ "bizType": "SPOT",
+ "rate": 600
+ }
+ ]
+))
+```
+
+
+
+
+```n4js
+
+```
+
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/earn/hourly-yield.mdx b/docs/v5/earn/hourly-yield.mdx
index 7227e18c6a..15869ade23 100644
--- a/docs/v5/earn/hourly-yield.mdx
+++ b/docs/v5/earn/hourly-yield.mdx
@@ -54,7 +54,15 @@ Content-Type: application/json
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_hourly_yield(
+ category="FlexibleSaving"
+))
```
diff --git a/docs/v5/earn/yield-history.mdx b/docs/v5/earn/yield-history.mdx
index 6ee754482c..d5d88623a7 100644
--- a/docs/v5/earn/yield-history.mdx
+++ b/docs/v5/earn/yield-history.mdx
@@ -58,7 +58,15 @@ Content-Type: application/json
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_yield(
+ category="FlexibleSaving"
+))
```
diff --git a/docs/v5/market/adl-alert.mdx b/docs/v5/market/adl-alert.mdx
index 072ce89f0a..816ec2a043 100644
--- a/docs/v5/market/adl-alert.mdx
+++ b/docs/v5/market/adl-alert.mdx
@@ -137,7 +137,15 @@ Host: api-testnet.bybit.com
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_adl_alert(
+ symbol="BTCUSDT"
+))
```
diff --git a/docs/v5/market/fee-group-info.mdx b/docs/v5/market/fee-group-info.mdx
index 8a765d0c9d..c9eac36f57 100644
--- a/docs/v5/market/fee-group-info.mdx
+++ b/docs/v5/market/fee-group-info.mdx
@@ -66,7 +66,16 @@ Host: api-testnet.bybit.com
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_fee_group_info(
+ productType="contract",
+ groupId="1"
+))
```
diff --git a/docs/v5/market/index-components.mdx b/docs/v5/market/index-components.mdx
index baf2458616..3be013b403 100644
--- a/docs/v5/market/index-components.mdx
+++ b/docs/v5/market/index-components.mdx
@@ -41,7 +41,15 @@ Host: api-testnet.bybit.com
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_index_price_components(
+ indexName="1000BTTUSDT"
+))
```
diff --git a/docs/v5/market/long-short-ratio.mdx b/docs/v5/market/long-short-ratio.mdx
index f6932d6e98..bdb24adc80 100644
--- a/docs/v5/market/long-short-ratio.mdx
+++ b/docs/v5/market/long-short-ratio.mdx
@@ -56,7 +56,20 @@ Host: api-testnet.bybit.com
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_long_short_ratio(
+ category="linear",
+ symbol="BTCUSDT",
+ period="1h",
+ limit=2,
+ startTime="1696089600000",
+ endTime="1696262400000"
+))
```
diff --git a/docs/v5/market/new-delivery-price.mdx b/docs/v5/market/new-delivery-price.mdx
index dc32ce4c90..906abd31f0 100644
--- a/docs/v5/market/new-delivery-price.mdx
+++ b/docs/v5/market/new-delivery-price.mdx
@@ -46,6 +46,16 @@ Host: api-testnet.bybit.com
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_new_delivery_price(
+ category="option",
+ baseCoin="BTC"
+))
```
diff --git a/docs/v5/market/rpi-orderbook.mdx b/docs/v5/market/rpi-orderbook.mdx
index d15d12ee36..5a499a3d87 100644
--- a/docs/v5/market/rpi-orderbook.mdx
+++ b/docs/v5/market/rpi-orderbook.mdx
@@ -57,6 +57,17 @@ Host: api-testnet.bybit.com
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_rpi_orderbook(
+ category="spot",
+ symbol="BTCUSDT",
+ limit=50
+))
```
diff --git a/docs/v5/new-crypto-loan/fixed/borrow-order.mdx b/docs/v5/new-crypto-loan/fixed/borrow-order.mdx
index bce79f3af0..4fea5665f6 100644
--- a/docs/v5/new-crypto-loan/fixed/borrow-order.mdx
+++ b/docs/v5/new-crypto-loan/fixed/borrow-order.mdx
@@ -52,7 +52,15 @@ X-BAPI-RECV-WINDOW: 5000
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_borrowing_orders_fixed_crypto_loan(
+ orderId="13010"
+))
```
diff --git a/docs/v5/new-crypto-loan/max-loan-amt.mdx b/docs/v5/new-crypto-loan/max-loan-amt.mdx
index 6cbf140b09..20256bab03 100644
--- a/docs/v5/new-crypto-loan/max-loan-amt.mdx
+++ b/docs/v5/new-crypto-loan/max-loan-amt.mdx
@@ -60,7 +60,25 @@ Content-Length: 208
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_max_loan_amount_new_crypto_loan(
+ currency="BTC",
+ collateralList=[
+ {
+ "ccy": "XRP",
+ "amount": "1000"
+ },
+ {
+ "ccy": "USDT",
+ "amount": "1000"
+ }
+ ]
+))
```
diff --git a/docs/v5/otc/repay.mdx b/docs/v5/otc/repay.mdx
index 20322c65f0..09ae67abd0 100644
--- a/docs/v5/otc/repay.mdx
+++ b/docs/v5/otc/repay.mdx
@@ -32,6 +32,9 @@ POST `/v5/ins-loan/repay-loan`
### Request Example
+
+
+
```http
POST /v5/ins-loan/repay-loan HTTP/1.1
Host: api-testnet.bybit.com
@@ -48,6 +51,27 @@ Content-Length: 49
}
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.repay_loan(
+ token="USDT",
+ quantity="500000"
+))
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/position/confirm-mmr.mdx b/docs/v5/position/confirm-mmr.mdx
index 4303b9c6d7..b736c28dcd 100644
--- a/docs/v5/position/confirm-mmr.mdx
+++ b/docs/v5/position/confirm-mmr.mdx
@@ -45,7 +45,16 @@ Content-Length: 53
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.confirm_new_risk_limit(
+ category="linear",
+ symbol="BTCUSDT"
+))
```
diff --git a/docs/v5/rate-limit/rules-for-pros/apilimit-query-all.mdx b/docs/v5/rate-limit/rules-for-pros/apilimit-query-all.mdx
index 082fa681f2..da24acb46c 100644
--- a/docs/v5/rate-limit/rules-for-pros/apilimit-query-all.mdx
+++ b/docs/v5/rate-limit/rules-for-pros/apilimit-query-all.mdx
@@ -30,6 +30,9 @@ GET `/v5/apilimit/query-all`
|> rate |integer|API Rate limit per second |
### Request Example
+
+
+
```http
GET /v5/apilimit/query-all HTTP/1.1
Host: api.bybit.com
@@ -41,6 +44,30 @@ Content-Type: application/json
Content-Length: 2
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_all_api_rate_limits())
+```
+
+
+
+
+```n4js
+
+```
+
+
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/rate-limit/rules-for-pros/apilimit-query-cap.mdx b/docs/v5/rate-limit/rules-for-pros/apilimit-query-cap.mdx
index e208b303a0..c18d4e8b28 100644
--- a/docs/v5/rate-limit/rules-for-pros/apilimit-query-cap.mdx
+++ b/docs/v5/rate-limit/rules-for-pros/apilimit-query-cap.mdx
@@ -27,6 +27,9 @@ None
|> uidCap |integer|UID-level API rate limit per second |
### Request Example
+
+
+
```http
GET /v5/apilimit/query-cap HTTP/1.1
Host: api.bybit.com
@@ -38,6 +41,29 @@ Content-Type: application/json
Content-Length: 2
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_api_rate_limit_cap())
+```
+
+
+
+
+```n4js
+
+```
+
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/rate-limit/rules-for-pros/apilimit-query.mdx b/docs/v5/rate-limit/rules-for-pros/apilimit-query.mdx
index cb23e1fbd0..e6655e3025 100644
--- a/docs/v5/rate-limit/rules-for-pros/apilimit-query.mdx
+++ b/docs/v5/rate-limit/rules-for-pros/apilimit-query.mdx
@@ -28,6 +28,9 @@ GET `/v5/apilimit/query`
|> rate |integer|API rate limit per second |
### Request Example
+
+
+
```http
GET /v5/apilimit/query?uids=290118 HTTP/1.1
Host: api.bybit.com
@@ -39,6 +42,31 @@ Content-Type: application/json
Content-Length: 2
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_api_rate_limit(
+ uids="290118"
+))
+```
+
+
+
+
+```n4js
+
+```
+
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/rate-limit/rules-for-pros/apilimit-set.mdx b/docs/v5/rate-limit/rules-for-pros/apilimit-set.mdx
index 1ed0ac7157..42ed227681 100644
--- a/docs/v5/rate-limit/rules-for-pros/apilimit-set.mdx
+++ b/docs/v5/rate-limit/rules-for-pros/apilimit-set.mdx
@@ -34,6 +34,9 @@ POST `/v5/apilimit/set`
|> [msg](/docs/v5/enum#msg) |string|Result message |
### Request Example
+
+
+
```http
POST /v5/apilimit/set HTTP/1.1
Host: api.bybit.com
@@ -54,6 +57,37 @@ Content-Type: application/json
}
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.set_api_rate_limit(
+ list=[
+ {
+ "uids": "106293838",
+ "bizType": "DERIVATIVES",
+ "rate": 50
+ }
+ ]
+))
+```
+
+
+
+
+```n4js
+
+```
+
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/rfq/trade/accept-other-quote.mdx b/docs/v5/rfq/trade/accept-other-quote.mdx
index f02e726572..7eed645388 100644
--- a/docs/v5/rfq/trade/accept-other-quote.mdx
+++ b/docs/v5/rfq/trade/accept-other-quote.mdx
@@ -25,6 +25,9 @@ POST `/v5/rfq/accept-other-quote`
### Request Example
+
+
+
```http
POST /v5/rfq/accept-other-quote HTTP/1.1
Host: api-testnet.bybit.com
@@ -40,6 +43,27 @@ Content-Length: 115
}
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.accept_other_quote(
+ rfqId="1754364447601610516653123084412812"
+))
+```
+
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/cancel-all-quotes.mdx b/docs/v5/rfq/trade/cancel-all-quotes.mdx
index 6eae51ad2c..3a6a28c6b4 100644
--- a/docs/v5/rfq/trade/cancel-all-quotes.mdx
+++ b/docs/v5/rfq/trade/cancel-all-quotes.mdx
@@ -24,6 +24,9 @@ None
### Request Example
+
+
+
```http
POST /v5/rfq/cancel-all-quotes HTTP/1.1
Host: api-testnet.bybit.com
@@ -35,6 +38,25 @@ Content-Type: application/json
Content-Length: 115
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.cancel_all_quotes())
+```
+
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/cancel-all-rfq.mdx b/docs/v5/rfq/trade/cancel-all-rfq.mdx
index 4a51e8d5f7..9e6164b4a2 100644
--- a/docs/v5/rfq/trade/cancel-all-rfq.mdx
+++ b/docs/v5/rfq/trade/cancel-all-rfq.mdx
@@ -27,6 +27,9 @@ None
### Request Example
+
+
+
```http
POST /v5/rfq/cancel-all-rfq HTTP/1.1
Host: api-testnet.bybit.com
@@ -38,6 +41,25 @@ Content-Type: application/json
Content-Length: 115
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.cancel_all_quotes())
+```
+
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/cancel-quote.mdx b/docs/v5/rfq/trade/cancel-quote.mdx
index d71baea977..63ee029da2 100644
--- a/docs/v5/rfq/trade/cancel-quote.mdx
+++ b/docs/v5/rfq/trade/cancel-quote.mdx
@@ -31,6 +31,9 @@ POST `/v5/rfq/cancel-quote`
### Request Example
+
+
+
```http
POST /v5/rfq/cancel-quote HTTP/1.1
Host: api-testnet.bybit.com
@@ -46,6 +49,26 @@ Content-Length: 115
}
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.cancel_quote(
+ quoteId="1754364447601610516653123084412812"
+))
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/cancel-rfq.mdx b/docs/v5/rfq/trade/cancel-rfq.mdx
index 2cd421dffc..7e7f7b8ade 100644
--- a/docs/v5/rfq/trade/cancel-rfq.mdx
+++ b/docs/v5/rfq/trade/cancel-rfq.mdx
@@ -27,6 +27,9 @@ POST `/v5/rfq/cancel-rfq`
### Request Example
+
+
+
```http
POST /v5/rfq/cancel-rfq HTTP/1.1
Host: api-testnet.bybit.com
@@ -42,6 +45,26 @@ Content-Length: 115
}
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.cancel_rfq(
+ rfqId="1756871488168105512459181956436945"
+))
+```
+
+
+
+
+
### Response Example
```json
@@ -56,15 +79,3 @@ Content-Length: 115
"time": 1756871494507
}
```
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/docs/v5/rfq/trade/create-quote.mdx b/docs/v5/rfq/trade/create-quote.mdx
index 40077fb1d3..a6178fa7ff 100644
--- a/docs/v5/rfq/trade/create-quote.mdx
+++ b/docs/v5/rfq/trade/create-quote.mdx
@@ -45,6 +45,9 @@ POST `/v5/rfq/create-quote`
### Request Example
+
+
+
```http
POST /v5/rfq/create-quote HTTP/1.1
Host: api-testnet.bybit.com
@@ -74,6 +77,40 @@ Content-Length: 115
}
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.create_quote(
+ rfqId="1754364447601610516653123084412812",
+ quoteBuyList=[
+ {
+ "category": "linear",
+ "symbol": "BTCUSDT",
+ "price": "106000"
+ }
+ ],
+ quoteSellList=[
+ {
+ "category": "linear",
+ "symbol": "BTCUSDT",
+ "price": "126500"
+ }
+ ]
+))
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/create-rfq.mdx b/docs/v5/rfq/trade/create-rfq.mdx
index db88ec51b6..996a435097 100644
--- a/docs/v5/rfq/trade/create-rfq.mdx
+++ b/docs/v5/rfq/trade/create-rfq.mdx
@@ -41,6 +41,9 @@ POST `/v5/rfq/create-rfq`
### Request Example
+
+
+
```http
POST /v5/rfq/create-rfq HTTP/1.1
Host: api-testnet.bybit.com
@@ -79,6 +82,49 @@ Content-Length: 115
}
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.create_rfq(
+ counterparties=["LP4", "LP5"],
+ rfqLinkId="rfq00993",
+ anonymous=False,
+ strategyType="custom",
+ list=[
+ {
+ "category": "linear",
+ "symbol": "BTCUSDT",
+ "side": "Buy",
+ "qty": "2"
+ },
+ {
+ "category": "spot",
+ "symbol": "BTCUSDT",
+ "side": "Buy",
+ "qty": "2"
+ },
+ {
+ "category": "option",
+ "symbol": "BTCUSDT",
+ "side": "Sell",
+ "qty": "2"
+ }
+ ]
+))
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/execute-quote.mdx b/docs/v5/rfq/trade/execute-quote.mdx
index 26a4c43f2a..a4dd37dbd1 100644
--- a/docs/v5/rfq/trade/execute-quote.mdx
+++ b/docs/v5/rfq/trade/execute-quote.mdx
@@ -29,6 +29,9 @@ POST `/v5/rfq/execute-quote`
### Request Example
+
+
+
```http
POST /v5/rfq/execute-quote HTTP/1.1
Host: api-testnet.bybit.com
@@ -46,6 +49,28 @@ Content-Length: 115
}
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.execute_quote(
+ rfqId="1754364447601610516653123084412812",
+ quoteId="111",
+ quoteSide="Buy"
+))
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/public-trades.mdx b/docs/v5/rfq/trade/public-trades.mdx
index 4c32ff82d1..fa33937a50 100644
--- a/docs/v5/rfq/trade/public-trades.mdx
+++ b/docs/v5/rfq/trade/public-trades.mdx
@@ -38,6 +38,9 @@ GET `/v5/rfq/public-trades`
### Request Example
+
+
+
```http
GET /v5/rfq/public-trades HTTP/1.1
Host: api-testnet.bybit.com
@@ -47,6 +50,24 @@ X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_public_trades())
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/quote-list.mdx b/docs/v5/rfq/trade/quote-list.mdx
index 013f5acd18..990403b712 100644
--- a/docs/v5/rfq/trade/quote-list.mdx
+++ b/docs/v5/rfq/trade/quote-list.mdx
@@ -55,6 +55,9 @@ GET `/v5/rfq/quote-list`
### Request Example
+
+
+
```http
GET /v5/rfq/quote-list HTTP/1.1
Host: api-testnet.bybit.com
@@ -64,6 +67,24 @@ X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_quote_list())
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/quote-realtime.mdx b/docs/v5/rfq/trade/quote-realtime.mdx
index 55c2c1c206..6925325ef8 100644
--- a/docs/v5/rfq/trade/quote-realtime.mdx
+++ b/docs/v5/rfq/trade/quote-realtime.mdx
@@ -51,6 +51,9 @@ GET `/v5/rfq/quote-realtime`
### Request Example
+
+
+
```http
GET /v5/rfq/quote-realtime HTTP/1.1
Host: api-testnet.bybit.com
@@ -60,6 +63,24 @@ X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_quote_realtime())
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/rfq-config.mdx b/docs/v5/rfq/trade/rfq-config.mdx
index e1b8e8da2f..6490c1fd72 100644
--- a/docs/v5/rfq/trade/rfq-config.mdx
+++ b/docs/v5/rfq/trade/rfq-config.mdx
@@ -37,6 +37,9 @@ None
### Request Example
+
+
+
```http
GET /v5/rfq/create-rfq HTTP/1.1
Host: api-testnet.bybit.com
@@ -46,6 +49,24 @@ X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_rfq_config())
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/rfq-list.mdx b/docs/v5/rfq/trade/rfq-list.mdx
index 71558f23bc..49f55a95b6 100644
--- a/docs/v5/rfq/trade/rfq-list.mdx
+++ b/docs/v5/rfq/trade/rfq-list.mdx
@@ -48,6 +48,9 @@ GET `/v5/rfq/rfq-list`
### Request Example
+
+
+
```http
GET /v5/rfq/rfq-list HTTP/1.1
Host: api-testnet.bybit.com
@@ -57,6 +60,24 @@ X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_rfq_list())
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/rfq-realtime.mdx b/docs/v5/rfq/trade/rfq-realtime.mdx
index 63ad8ced6e..d6a3cc8f82 100644
--- a/docs/v5/rfq/trade/rfq-realtime.mdx
+++ b/docs/v5/rfq/trade/rfq-realtime.mdx
@@ -45,6 +45,9 @@ GET `/v5/rfq/rfq-realtime`
### Request Example
+
+
+
```http
GET /v5/rfq/rfq-realtime HTTP/1.1
Host: api-testnet.bybit.com
@@ -54,6 +57,24 @@ X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_rfq_realtime())
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/rfq/trade/trade-list.mdx b/docs/v5/rfq/trade/trade-list.mdx
index c218f0b024..58779f2d93 100644
--- a/docs/v5/rfq/trade/trade-list.mdx
+++ b/docs/v5/rfq/trade/trade-list.mdx
@@ -57,6 +57,9 @@ GET `/v5/rfq/trade-list`
### Request Example
+
+
+
```http
GET /v5/rfq/trade-list HTTP/1.1
Host: api-testnet.bybit.com
@@ -66,6 +69,24 @@ X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
```
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_trade_list())
+```
+
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/spot-margin-uta/coinstate.mdx b/docs/v5/spot-margin-uta/coinstate.mdx
index 1818e34466..4bffbc369a 100644
--- a/docs/v5/spot-margin-uta/coinstate.mdx
+++ b/docs/v5/spot-margin-uta/coinstate.mdx
@@ -39,6 +39,15 @@ X-BAPI-RECV-WINDOW: 5000
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spot_margin_trade_get_coin_state(
+ currency="BTC"
+))
```
diff --git a/docs/v5/spot-margin-uta/currency-data.mdx b/docs/v5/spot-margin-uta/currency-data.mdx
index 3b6e09e3b1..7c2e07a564 100644
--- a/docs/v5/spot-margin-uta/currency-data.mdx
+++ b/docs/v5/spot-margin-uta/currency-data.mdx
@@ -51,6 +51,15 @@ X-BAPI-RECV-WINDOW: 5000
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spot_margin_trade_get_currency_data(
+ currency="BTC"
+))
```
diff --git a/docs/v5/spot-margin-uta/get-auto-repay-mode.mdx b/docs/v5/spot-margin-uta/get-auto-repay-mode.mdx
index 7d5faa954a..38b138cf96 100644
--- a/docs/v5/spot-margin-uta/get-auto-repay-mode.mdx
+++ b/docs/v5/spot-margin-uta/get-auto-repay-mode.mdx
@@ -41,6 +41,15 @@ Content-Type: application/json
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_auto_repay_mode(
+ currency="ETH"
+))
```
diff --git a/docs/v5/spot-margin-uta/max-borrowable.mdx b/docs/v5/spot-margin-uta/max-borrowable.mdx
index 09444bce00..716e7d38aa 100644
--- a/docs/v5/spot-margin-uta/max-borrowable.mdx
+++ b/docs/v5/spot-margin-uta/max-borrowable.mdx
@@ -39,6 +39,15 @@ X-BAPI-RECV-WINDOW: 5000
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spot_margin_trade_get_max_borrowable(
+ currency="BTC"
+))
```
diff --git a/docs/v5/spot-margin-uta/position-tiers.mdx b/docs/v5/spot-margin-uta/position-tiers.mdx
index 2486a69198..64a4b07049 100644
--- a/docs/v5/spot-margin-uta/position-tiers.mdx
+++ b/docs/v5/spot-margin-uta/position-tiers.mdx
@@ -48,6 +48,15 @@ X-BAPI-RECV-WINDOW: 5000
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spot_margin_trade_get_position_tiers(
+ currency="BTC"
+))
```
diff --git a/docs/v5/spot-margin-uta/repayment-available-amount.mdx b/docs/v5/spot-margin-uta/repayment-available-amount.mdx
index 8589f97c9a..7184593006 100644
--- a/docs/v5/spot-margin-uta/repayment-available-amount.mdx
+++ b/docs/v5/spot-margin-uta/repayment-available-amount.mdx
@@ -38,6 +38,15 @@ X-BAPI-RECV-WINDOW: 5000
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spot_margin_trade_get_repayment_available_amount(
+ currency="BTC"
+))
```
diff --git a/docs/v5/spot-margin-uta/set-auto-repay-mode.mdx b/docs/v5/spot-margin-uta/set-auto-repay-mode.mdx
index f431691adc..86a2f97227 100644
--- a/docs/v5/spot-margin-uta/set-auto-repay-mode.mdx
+++ b/docs/v5/spot-margin-uta/set-auto-repay-mode.mdx
@@ -54,6 +54,16 @@ Content-Type: application/json
```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.set_auto_repay_mode(
+ currency="ETH",
+ autoRepayMode="1"
+))
```
diff --git a/docs/v5/spread/market/instrument.mdx b/docs/v5/spread/market/instrument.mdx
index ab2c75e1f7..a5a2fcf3b7 100644
--- a/docs/v5/spread/market/instrument.mdx
+++ b/docs/v5/spread/market/instrument.mdx
@@ -46,11 +46,32 @@ GET `/v5/spread/instrument`
### Request Example
+
+
+
```http
GET /v5/spread/instrument?limit=1 HTTP/1.1
Host: api-testnet.bybit.com
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_get_instruments_info(
+ limit=1
+))
```
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/spread/market/orderbook.mdx b/docs/v5/spread/market/orderbook.mdx
index 5945791295..3302ad9cee 100644
--- a/docs/v5/spread/market/orderbook.mdx
+++ b/docs/v5/spread/market/orderbook.mdx
@@ -32,11 +32,34 @@ GET `/v5/spread/orderbook`
### Request Example
+
+
+
```http
GET /v5/spread/orderbook?symbol=SOLUSDT_SOL/USDT&limit=1 HTTP/1.1
Host: api-testnet.bybit.com
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_get_orderbook(
+ symbol="SOLUSDT_SOL/USDT",
+ limit=1
+))
```
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/spread/market/recent-trade.mdx b/docs/v5/spread/market/recent-trade.mdx
index 76ffc82d14..b66c446046 100644
--- a/docs/v5/spread/market/recent-trade.mdx
+++ b/docs/v5/spread/market/recent-trade.mdx
@@ -28,11 +28,33 @@ GET `/v5/spread/recent-trade`
|> seq |string |Cross sequence |
### Request Example
+
+
+
```http
GET /v5/spread/recent-trade?symbol=SOLUSDT_SOL/USDT&limit=2 HTTP/1.1
Host: api-testnet.bybit.com
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_get_public_trade_history(
+ symbol="SOLUSDT_SOL/USDT",
+ limit=2
+))
```
+
+
+
### Response Example
```json
diff --git a/docs/v5/spread/market/tickers.mdx b/docs/v5/spread/market/tickers.mdx
index a1571adc31..7f8d18f7ee 100644
--- a/docs/v5/spread/market/tickers.mdx
+++ b/docs/v5/spread/market/tickers.mdx
@@ -34,11 +34,32 @@ GET `/v5/spread/tickers`
|> volume24h|string |Volume for 24h |
### Request Example
+
+
+
```http
GET /v5/spread/tickers?symbol=SOLUSDT_SOL/USDT HTTP/1.1
Host: api-testnet.bybit.com
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_get_tickers(
+ symbol="SOLUSDT_SOL/USDT"
+))
```
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/spread/trade/amend-order.mdx b/docs/v5/spread/trade/amend-order.mdx
index ac70b2a301..c97d197d2d 100644
--- a/docs/v5/spread/trade/amend-order.mdx
+++ b/docs/v5/spread/trade/amend-order.mdx
@@ -31,6 +31,9 @@ The acknowledgement of an amend order request indicates that the request was suc
### Request Example
+
+
+
```http
POST /v5/spread/order/amend HTTP/1.1
Host: api-testnet.bybit.com
@@ -47,8 +50,30 @@ Content-Length: 115
"price": "14",
"qty": "0.2"
}
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_amend_order(
+ symbol="SOLUSDT_SOL/USDT",
+ orderLinkId="1744072052193428475",
+ price="14",
+ qty="0.2"
+))
```
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/spread/trade/cancel-all.mdx b/docs/v5/spread/trade/cancel-all.mdx
index 17008fa74c..35b79d86d6 100644
--- a/docs/v5/spread/trade/cancel-all.mdx
+++ b/docs/v5/spread/trade/cancel-all.mdx
@@ -28,6 +28,9 @@ The acknowledgement of cancel all orders request indicates that the request was
### Request Example
+
+
+
```http
POST /v5/spread/order/cancel-all HTTP/1.1
Host: api-testnet.bybit.com
@@ -42,8 +45,27 @@ Content-Length: 49
"symbol": null,
"cancelAll": true
}
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_cancel_all_orders(
+ cancelAll=True
+))
```
+
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/spread/trade/cancel-order.mdx b/docs/v5/spread/trade/cancel-order.mdx
index 627d04c7bf..4b0c4ec7cb 100644
--- a/docs/v5/spread/trade/cancel-order.mdx
+++ b/docs/v5/spread/trade/cancel-order.mdx
@@ -24,6 +24,9 @@ The acknowledgement of an cancel order request indicates that the request was su
:::
### Request Example
+
+
+
```http
POST /v5/spread/order/cancel HTTP/1.1
Host: api-testnet.bybit.com
@@ -37,8 +40,27 @@ Content-Length: 48
{
"orderLinkId": "1744072052193428476"
}
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_cancel_order(
+ orderLinkId="1744072052193428476"
+))
```
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/spread/trade/create-order.mdx b/docs/v5/spread/trade/create-order.mdx
index 3b024b2b76..82b252a5ed 100644
--- a/docs/v5/spread/trade/create-order.mdx
+++ b/docs/v5/spread/trade/create-order.mdx
@@ -31,6 +31,9 @@ The acknowledgement of an place order request indicates that the request was suc
### Request Example
+
+
+
```http
POST /v5/spread/order/create HTTP/1.1
Host: api-testnet.bybit.com
@@ -50,8 +53,33 @@ Content-Length: 191
"orderLinkId": "1744072052193428479",
"timeInForce": "PostOnly"
}
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_place_order(
+ symbol="SOLUSDT_SOL/USDT",
+ side="Buy",
+ orderType="Limit",
+ qty="0.1",
+ price="21",
+ orderLinkId="1744072052193428479",
+ timeInForce="PostOnly"
+))
```
+
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/spread/trade/open-order.mdx b/docs/v5/spread/trade/open-order.mdx
index be21ea3c94..226235fc30 100644
--- a/docs/v5/spread/trade/open-order.mdx
+++ b/docs/v5/spread/trade/open-order.mdx
@@ -43,6 +43,9 @@ GET `/v5/spread/order/realtime`
### Request Example
+
+
+
```http
GET /v5/spread/order/realtime HTTP/1.1
Host: api-testnet.bybit.com
@@ -51,8 +54,24 @@ X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1744096099520
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_get_open_orders())
```
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/spread/trade/order-history.mdx b/docs/v5/spread/trade/order-history.mdx
index 88aa5372ea..54cc782205 100644
--- a/docs/v5/spread/trade/order-history.mdx
+++ b/docs/v5/spread/trade/order-history.mdx
@@ -59,6 +59,9 @@ GET `/v5/spread/order/history`
### Request Example
+
+
+
```http
GET /v5/spread/order/history?orderId=aaaee090-fab3-42ea-aea0-c9fbfe6c4bc4 HTTP/1.1
Host: api-testnet.bybit.com
@@ -67,8 +70,26 @@ X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1744100522465
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_get_order_history(
+ orderId="aaaee090-fab3-42ea-aea0-c9fbfe6c4bc4"
+))
```
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/spread/trade/trade-history.mdx b/docs/v5/spread/trade/trade-history.mdx
index 5647d20531..5daf149458 100644
--- a/docs/v5/spread/trade/trade-history.mdx
+++ b/docs/v5/spread/trade/trade-history.mdx
@@ -53,6 +53,9 @@ GET `/v5/spread/execution/list`
### Request Example
+
+
+
```http
GET /v5/spread/execution/list?orderId=5e010c35-2b44-4f03-8081-8fa31fb73376 HTTP/1.1
Host: api-testnet.bybit.com
@@ -61,8 +64,26 @@ X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1744105738529
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
+````
+
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.spread_get_trade_history(
+ orderId="5e010c35-2b44-4f03-8081-8fa31fb73376"
+))
```
+
+
+
### Response Example
```json
{
diff --git a/docs/v5/user/friend-referral.mdx b/docs/v5/user/friend-referral.mdx
index 731399120b..f15f3e18c0 100644
--- a/docs/v5/user/friend-referral.mdx
+++ b/docs/v5/user/friend-referral.mdx
@@ -31,6 +31,9 @@ GET `/v5/user/invitation/referrals`
### Request Example
+
+
+
```http
GET /v5/user/invitation/referrals?status=0&size=5&cursor=6867 HTTP/1.1
Host: api-testnet.bybit.com
@@ -41,6 +44,32 @@ X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_friend_referrals(
+ status="0",
+ size="5",
+ cursor="6867"
+))
+```
+
+
+
+
+
+```n4js
+```
+
+
+
### Response Example
diff --git a/docs/v5/user/fund-subuid-list.mdx b/docs/v5/user/fund-subuid-list.mdx
index 7641ce63ac..9481672e68 100644
--- a/docs/v5/user/fund-subuid-list.mdx
+++ b/docs/v5/user/fund-subuid-list.mdx
@@ -50,7 +50,15 @@ Content-Type: application/json
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_escrow_sub_members(
+ pageSize="2"
+))
```
diff --git a/docs/v5/user/list-sub-apikeys.mdx b/docs/v5/user/list-sub-apikeys.mdx
index 1aa7fce0e0..70f76466a1 100644
--- a/docs/v5/user/list-sub-apikeys.mdx
+++ b/docs/v5/user/list-sub-apikeys.mdx
@@ -73,7 +73,16 @@ Content-Type: application/json
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_all_sub_api_keys(
+ subMemberId="100400345",
+ limit=20
+))
```
diff --git a/docs/v5/user/rm-subuid.mdx b/docs/v5/user/rm-subuid.mdx
index 47b27ef332..ba0c09cd94 100755
--- a/docs/v5/user/rm-subuid.mdx
+++ b/docs/v5/user/rm-subuid.mdx
@@ -46,7 +46,15 @@ Content-Length: 34
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.delete_sub_uid(
+ subMemberId="112725187"
+))
```
diff --git a/docs/v5/user/sign-agreement.mdx b/docs/v5/user/sign-agreement.mdx
index 2f659f3ee2..179a87db8c 100644
--- a/docs/v5/user/sign-agreement.mdx
+++ b/docs/v5/user/sign-agreement.mdx
@@ -26,6 +26,9 @@ None
### Request Example
+
+
+
```http
POST /v5/user/agreement HTTP/1.1
Host: api-testnet.bybit.com
@@ -42,6 +45,25 @@ Content-Length: 40
}
```
+
+
+
+```python
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.sign_agreement(
+ category=2,
+ agree=True
+))
+```
+
+
+
+
### Response Example
```json
diff --git a/docs/v5/user/wallet-type.mdx b/docs/v5/user/wallet-type.mdx
index 780a906601..7a2169a384 100644
--- a/docs/v5/user/wallet-type.mdx
+++ b/docs/v5/user/wallet-type.mdx
@@ -48,7 +48,15 @@ Content-Type: application/json
```python
-
+from pybit.unified_trading import HTTP
+session = HTTP(
+ testnet=True,
+ api_key="xxxxxxxxxxxxxxxxxx",
+ api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
+)
+print(session.get_uid_wallet_type(
+ memberIds="subUID1,subUID2"
+))
```