Get Earning
info
- Use exchange broker master account to query
- The data can support up to past 1 months until T-1. To extract data from over a month ago, please contact your Relationship Manager
begin
&end
are either entered at the same time or not entered, and latest 7 days data are returned by default
API rate limit: 10 req / sec
HTTP Request
GET /v5/broker/earnings-info
Request Parameters
Parameter | Required | Type | Comments |
---|---|---|---|
bizType | false | string | Business type. SPOT , DERIVATIVES , OPTIONS , CONVERT |
begin | false | string | Begin date, in the format of YYYYMMDD, e.g, 20231201, search the data from 1st Dec 2023 00:00:00 UTC (include) |
end | false | string | End date, in the format of YYYYMMDD, e.g, 20231201, search the data before 2nd Dec 2023 00:00:00 UTC (exclude) |
uid | false | string |
|
limit | false | integer | Limit for data size per page. [1 , 1000 ]. Default: 1000 |
cursor | false | string | Cursor. Use the nextPageCursor token from the response to retrieve the next page of the result set |
Response Parameters
Parameter | Type | Comments |
---|---|---|
totalEarningCat | Object | Category statistics for total earning data |
> spot | array | Object. Earning for Spot trading. If do not have any rebate, keep empty array |
>> coin | string | Rebate coin name |
>> earning | string | Rebate amount of the coin |
> derivatives | array | Object. Earning for Derivatives trading. If do not have any rebate, keep empty array |
>> coin | string | Rebate coin name |
>> earning | string | Rebate amount of the coin |
> options | array | Object. Earning for Option trading. If do not have any rebate, keep empty array |
>> coin | string | Rebate coin name |
>> earning | string | Rebate amount of the coin |
> convert | array | Object. Earning for Convert trading. If do not have any rebate, keep empty array |
>> coin | string | Rebate coin name |
>> earning | string | Rebate amount of the coin |
> total | array | Object. Sum earnings of all categories. If do not have any rebate, keep empty array |
>> coin | string | Rebate coin name |
>> earning | string | Rebate amount of the coin |
details | array | Object. Detailed trading information for each sub UID and each category |
> userId | string | Sub UID |
> bizType | string | Business type. SPOT , DERIVATIVES , OPTIONS , CONVERT |
> symbol | string | Symbol name |
> coin | string | Rebate coin name |
> earning | string | Rebate amount |
> markupEarning | string | Earning generated from markup fee rate |
> baseFeeEarning | string | Earning generated from base fee rate |
> orderId | string | Order ID |
> execTime | string | Order execution timestamp (ms) |
nextPageCursor | string | Refer to the cursor request parameter |
Request Example
- HTTP
- Python
- Node.js
GET /v5/broker/earnings-info?begin=20231129&end=20231129&uid=117894077 HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1701399431920
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: 32d2aa1bc205ddfb89849b85e2a8b7e23b1f8f69fe95d6f2cb9c87562f9086a6
Content-Type: application/json
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'apikey',
secret: 'apisecret',
});
client
.getExchangeBrokerEarnings({
bizType: 'SPOT',
begin: '20231201',
end: '20231207',
limit: 1000,
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
Response Example
{
"retCode": 0,
"retMsg": "success",
"result": {
"totalEarningCat": {
"spot": [],
"derivatives": [
{
"coin": "USDT",
"earning": "0.00027844"
}
],
"options": [],
"total": [
{
"coin": "USDT",
"earning": "0.00027844"
}
]
},
"details": [
{
"userId": "117894077",
"bizType": "DERIVATIVES",
"symbol": "DOGEUSDT",
"coin": "USDT",
"earning": "0.00016166",
"markupEarning": "0.000032332",
"baseFeeEarning": "0.000129328",
"orderId": "ec2132f2-a7e0-4a0c-9219-9f3cbcd8e878",
"execTime": "1701275846033"
},
{
"userId": "117894077",
"bizType": "DERIVATIVES",
"symbol": "TRXUSDT",
"coin": "USDT",
"earning": "0.00011678",
"markupEarning": "0.000023356",
"baseFeeEarning": "0.000093424",
"orderId": "28b29c2b-ba14-450e-9ce7-3cee0c1fa6da",
"execTime": "1701245285017"
}
],
"nextPageCursor": ""
},
"retExtInfo": {},
"time": 1701398193964
}