Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/changelog/v5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ import '/src/css/changelog.css';

## 2026-03-24
### REST API
- [Get Spread Max Qty](../v5/spread/trade/max-qty) [NEW]
- Add a new endpoint to query the available balance for placing a spread order based on symbol ID, side, and order price
- [Get Option Asset Info](../v5/account/option-asset-info) [NEW]
- Add a new endpoint to query option asset P&L information per coin, including delta, realised/unrealised P&L, and margin data
- [Get Portfolio Margin Info](../v5/asset/portfolio-margin) [NEW]
- Add a new endpoint to query portfolio margin account wallet balance and asset P&L range information
- [Get Merge Borrow Info](../v5/account/merge-borrow-info) [NEW]
- Add a new endpoint to query merged borrow information and collateral details for the account
- [Get Pay Info](../v5/account/pay-info) [NEW]
- Add a new endpoint to query repayment collateral information for the account
- [Get Trade Info For Analysis](../v5/account/trade-info-for-analysis) [NEW]
- Add a new endpoint to query aggregated trade statistics for a symbol, including execution values, quantities, fees, and daily breakdown
- [Get Total Members Assets](../v5/asset/total-members-assets) [NEW]
- Add a new endpoint to query total assets across all member accounts with optional coin-denominated valuation
- [Get Trade Behaviour Config](../v5/account/get-user-setting-config) [UPDATE]
- Add new response fields `smsef` and `fmsef` to indicate whether Spot and Futures MNT fee deduction is enabled

- [Manual Repay](../v5/account/repay) [UPDATE]
- [Repay Liability](../v5/account/repay-liability) [UPDATE]
- [Manual Repay Without Asset Conversion](../v5/account/no-convert-repay) [UPDATE]
Expand Down
9 changes: 6 additions & 3 deletions docs/v5/account/get-user-setting-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ None
|> lpaSpot |boolean |<ul><li>`true`: If the order price exceeds the limit, the system will automatically adjust the price to the nearest allowed price</li><li>`false`: If the order price exceeds the limit, the system rejects the request.</li></ul>|
|> lpaPerp |boolean |<ul><li>`true`: If the order price exceeds the limit, the system rejects the request.</li><li>`false`: If the order price exceeds the limit, the system will automatically adjust the price to the nearest allowed price.</li></ul>|
|> deltaEnable |boolean |Whether [Delta Neutral mode](/docs/v5/account/set-delta-mode) is enabled. `true`: enabled; `false`: disabled|
|> smsef |boolean |Whether Spot MNT fee deduction is enabled. `true`: enabled; `false`: disabled|
|> fmsef |boolean |Whether Futures MNT fee deduction is enabled. `true`: enabled; `false`: disabled|


### Request Example
Expand Down Expand Up @@ -87,11 +89,12 @@ print(session.get_user_setting_config())
"retCode": 0,
"retMsg": "OK",
"result": {
"lpaSpot": true,
"lpaSpot": false,
"lpaPerp": false,
"deltaEnable": false
"smsef": false,
"fmsef": false
},
"retExtInfo": {},
"time": 1756794317787
"time": 1773234932707
}
```
111 changes: 111 additions & 0 deletions docs/v5/account/merge-borrow-info.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
---
title: Get Merge Borrow Info
sidebar_label: Get Merge Borrow Info
sidebar_position: 24
---

Query merged borrow information and collateral details for the account.

### HTTP Request
<APIEndpoint method="GET" url="/v5/account/merge-borrow-info" />

### Request Parameters
| Parameter | Required | Type | Comments|
|:----- |:-------|:-----|------ |
|coin |false |string |Coin name, e.g. `USDT`, `BTC`. Returns all borrow info if not passed|

### Response Parameters
| Parameter | Type | Comments|
|:----- |:-----|----- |
|borrowInfo |object |Borrow info |
|> coin |string |Borrowed coin |
|> borrowSize |string |Borrow size |
|> borrowValue |string |Borrow value |
|> assetFrozen |string |Frozen asset |
|> availableBalance |string |Available balance |
|> totalLiability |string |Total liability |
|collateralInfo |object |Collateral info |
|> totalAvailable |string |Total available collateral value |
|> fee |string |Fee |
|> collateralList |array&lt;object&gt; |Collateral list |
|>> coin |string |Collateral coin |
|>> availableSize |string |Available size |
|>> availableValue |string |Available value |
|>> coinScale |integer |Coin precision |
|>> spotHedgeAmount |string |Spot hedge amount |
|>> assetFrozen |string |Frozen asset |

### Request Example

<Tabs groupId="programming-languages">
<TabItem value="http" label="HTTP">

```http
GET /v5/account/merge-borrow-info?coin=USDT HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1773230920000
X-BAPI-RECV-WINDOW: 5000
```

</TabItem>
<TabItem value="python" label="Python">

```python

```

</TabItem>

<TabItem value="Node" label="Node.js">

```n4js

```

</TabItem>
</Tabs>

### Response Example

```json
{
"retCode": 0,
"retMsg": "Success",
"result": {
"collateralInfo": {
"totalAvailable": "17.45",
"collateralList": [
{
"availableValue": "0.02",
"coinScale": 8,
"spotHedgeAmount": "0.00000000",
"assetFrozen": "",
"availableSize": "0.02927721",
"coin": "BTC"
},
{
"availableValue": "17.42",
"coinScale": 4,
"spotHedgeAmount": "0.0000",
"assetFrozen": "",
"availableSize": "1216139.7497",
"coin": "USDT"
}
],
"fee": "0.0003007168"
},
"borrowInfo": {
"borrowSize": "",
"totalLiability": "",
"assetFrozen": "",
"borrowValue": "0.30",
"coin": "",
"availableBalance": "17.15"
}
},
"retExtInfo": {},
"time": 1773230926409
}
```
83 changes: 83 additions & 0 deletions docs/v5/account/option-asset-info.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Get Option Asset Info
sidebar_label: Get Option Asset Info
sidebar_position: 23
---

Query the option asset profit and loss information for each coin under the account.

### HTTP Request
<APIEndpoint method="GET" url="/v5/account/option-asset-info" />

### Request Parameters
None

### Response Parameters
| Parameter | Type | Comments|
|:----- |:-----|----- |
|result |array&lt;object&gt; |Asset P&L info list |
|> coin |string |Coin name |
|> totalDelta |string |Total delta. Only includes delta from option **positions** |
|> totalRPL |string |Total realised P&L |
|> totalUPL |string |Total unrealised P&L |
|> assetIM |string |Asset initial margin. Includes IM occupied by option **open orders** |
|> assetMM |string |Asset maintenance margin. Includes MM occupied by option **open orders** |
|> version |long |Version number |
|> sendTime |long |Send timestamp (ms) |

### Request Example

<Tabs groupId="programming-languages">
<TabItem value="http" label="HTTP">

```http
GET /v5/account/option-asset-info HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1773230920000
X-BAPI-RECV-WINDOW: 5000
```

</TabItem>
<TabItem value="python" label="Python">

```python

```

</TabItem>

<TabItem value="Node" label="Node.js">

```n4js

```

</TabItem>
</Tabs>

### Response Example

```json
{
"retCode": 0,
"retMsg": "Success",
"result": {
"result": [
{
"totalDelta": "0.0118",
"assetIM": "0.0000",
"totalUPL": "-47.6318",
"totalRPL": "-0.2790",
"assetMM": "0.0000",
"version": 1600758,
"coin": "BTC",
"sendTime": 1773230923530
}
]
},
"retExtInfo": {},
"time": 1773230923533
}
```
104 changes: 104 additions & 0 deletions docs/v5/account/pay-info.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
title: Get Pay Info
sidebar_label: Get Pay Info
sidebar_position: 25
---

Query repayment collateral information for the account.

### HTTP Request
<APIEndpoint method="GET" url="/v5/account/pay-info" />

### Request Parameters
| Parameter | Required | Type | Comments|
|:----- |:-------|:-----|------ |
|coin |false |string |Coin name, e.g. `USDT`, `BTC`. Returns all repayment info if not passed|

### Response Parameters
| Parameter | Type | Comments|
|:----- |:-----|----- |
|collateralInfo |object |Collateral info |
|> collateralList |array&lt;object&gt; |Collateral list |
|>> coin |string |Coin name |
|>> availableSize |string |Available size |
|>> availableValue |string |Available value |
|>> coinScale |integer |Coin precision |
|>> borrowSize |string |Borrow size |
|>> spotHedgeAmount |string |Spot hedge amount |
|>> assetFrozen |string |Frozen asset |

### Request Example

<Tabs groupId="programming-languages">
<TabItem value="http" label="HTTP">

```http
GET /v5/account/pay-info?coin=USDT HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1773230920000
X-BAPI-RECV-WINDOW: 5000
```

</TabItem>
<TabItem value="python" label="Python">

```python

```

</TabItem>

<TabItem value="Node" label="Node.js">

```n4js

```

</TabItem>
</Tabs>

### Response Example

```json
{
"retCode": 0,
"retMsg": "Success",
"result": {
"collateralInfo": {
"collateralList": [
{
"availableValue": "0",
"coinScale": 6,
"borrowSize": "0",
"spotHedgeAmount": "0",
"assetFrozen": "0",
"availableSize": "0",
"coin": "USDC"
},
{
"availableValue": "0.3292772100000000000",
"coinScale": 8,
"borrowSize": "0.3",
"spotHedgeAmount": "0",
"assetFrozen": "0",
"availableSize": "0.329277210000000000",
"coin": "BTC"
},
{
"availableValue": "17.42799911416770180000000000",
"coinScale": 4,
"borrowSize": "50",
"spotHedgeAmount": "0",
"assetFrozen": "0",
"availableSize": "1216139.749700000000000000",
"coin": "USDT"
}
]
}
},
"retExtInfo": {},
"time": 1773230926882
}
```
Loading