Base Endpoint
- The base url for following endpoints is: https://api.binance.com
Query Client If The New User (USER DATA)
GET /sapi/v1/apiReferral/ifNewUser
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
apiAgentCode | STRING | YES | brokerId |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response:
{
"apiAgentCode": "ABCD1234",
"rebateWorking": false, // If the apiAgentCode is working ( true or false)
"ifNewUser": true, //true: new, false: old
"referrerId": 39472261
}
Customize Id For Client (USER DATA) (For broker)
POST /sapi/v1/apiReferral/customization
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
customerId | STRING | YES | |
STRING | YES | ||
recvWindow | LONG | NO | |
timestamp | LONG | YES |
- CustomerId must be unique
- For the same email, the customerId will be modified in real time
Response:
{
"customerId": "abc123",
"email": "test12345@126.com"
}
Get Client Email Customized Id (USER DATA) (For broker)
GET /sapi/v1/apiReferral/customization
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
customerId | STRING | NO | |
STRING | NO | ||
recvWindow | LONG | NO | |
timestamp | LONG | YES |
- CustomerId and email can not be sent at the same time
Response:
[
{
"customerId":"abc123",
"email":"testABCD@gmail.com"
},
{
"customerId":"abc345",
"email":"testABCD@gmail.com"
}
]
Customize Id For Client (USER DATA)(For client)
POST /sapi/v1/apiReferral/userCustomization
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
customerId | STRING | YES | |
apiAgentCode | STRING | YES | brokerId |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
- CustomerId must be unique for each apiAgent
Response:
{
"customerId": "abc123"
}
Get User’s Customize Id (USER DATA)
GET /sapi/v1/apiReferral/userCustomization
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
apiAgentCode | STRING | YES | brokerId |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
- CustomerId must be unique
Response:
{
"customerId": "abc123"
}
Query Rebate Recent Record (USER DATA)
GET /sapi/v1/apiReferral/rebate/recentRecord
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
customerId | STRING | NO | |
startTime | LONG | YES | |
endTime | LONG | YES | |
limit | INT | YES | max 500 |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
- startTime and endTime must be both specified or both omitted.
- When both omitted it returns last 7 days.
- When both specified the span has to be within 7 days.
Response:
[
{
"customerId": "",
"email": "test*****@126.com",
"income": "0.02063898",
"asset":"BTC",
"symbol": "ETHBTC",
"time":1544433328000,
"orderId": 10491232,
"tradeId": 611123
},
{
"customerId": "abd433",
"email": "abcd*****@gmail.com",
"income": "1.2063898",
"asset":"USDT",
"symbol": "BTCUSDT",
"time":1581580800000,
"orderId": 10500242,
"tradeId": 612323
}
]
Query Rebate Recent Record(for trader)
GET /sapi/v1/apiReferral/kickback/recentRecord
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
startTime | LONG | NO | |
endTime | LONG | NO | |
limit | INT | NO | Default 500, max 1000 |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
- Only get the latest history of past 7 days.
Response:
[
{
"income": "0.02063898",
"asset":"BTC",
"symbol": "ETHBTC",
"time":1544433328000
},
{
"income": "1.2063898",
"asset":"USDT",
"symbol": "BTCUSDT",
"time":1581580800000
}
]
Generate Commission Rebate History Data(for trader)
POST /sapi/v1/apiReferral/kickback/historicalRecord
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
startTime | LONG | NO | |
endTime | LONG | NO | |
limit | LONG | NO | |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
- Only get the latest history of past 30 days.
Response:
{
code: 200
msg: "Historical data is collecting"
}
Get Commission Rebate History Data(for trader)
GET /sapi/v1/apiReferral/kickback/historicalRecord
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
recvWindow | LONG | NO | |
timestamp | LONG | YES |
- Only get the latest history of past 30 days.
Response:
url to the data