Base Endpoint

  • The base url for following endpoints is: https://fapi.binance.com

Query Client If The New User (USER DATA)

GET /fapi/v1/apiReferral/ifNewUser

Weight:100

Parameters:

Name Type Mandatory Description
brokerId STRING YES
type INT NO 1:USDT-margined Futures,2: Coin-margined Futures; Default:1:USDT-margined Futures
recvWindow LONG NO
timestamp LONG YES
  • If the user enabled Portfolio Margin, please user relevant /papi endpoint

Response:

{
    "brokerId": "ABCD1234",
    "rebateWorking":false, 
    "ifNewUser": true 
}

Customize Id For Client (USER DATA)(For broker)

POST /fapi/v1/apiReferral/customization

Weight:100

Parameters:

Name Type Mandatory Description
customerId STRING YES
email STRING YES
recvWindow LONG NO
timestamp LONG YES
  • CustomerId must be unique

Response:

{
    "customerId": "abc123",
    "email": "test12345@126.com"
}

Get Client Email Customized Id (USER DATA)(For broker)

GET /fapi/v1/apiReferral/customization

Weight:100

Parameters:

Name Type Mandatory Description
customerId STRING NO
email STRING NO
page LONG NO default 1
limit LONG NO items num of one page,default 100,max 1000
recvWindow LONG NO
timestamp LONG YES
  • CustomerId and email can not be sent at the same time

Response:

[
    {
       "customerId": "abc123",
       "email": "test12345@126.com"  
    },

   {
       "customerId": "abc345",
       "email": "testABCD@gmail.com"
    }
]

Customize Id For Client (USER DATA)(For client)

POST /fapi/v1/apiReferral/userCustomization

Weight:100

Parameters:

Name Type Mandatory Description
customerId STRING YES
brokerId STRING YES
recvWindow LONG NO
timestamp LONG YES
  • CustomerId must be unique
  • If the user enabled Portfolio Margin, please user relevant /papi endpoint

Response:

{
    "brokerId": "ABCD1234",
    "customerId": "abc123"
}

Get User’s Customize Id (USER DATA)

GET /fapi/v1/apiReferral/userCustomization

Weight:100

Parameters:

Name Type Mandatory Description
brokerId STRING YES
recvWindow LONG NO
timestamp LONG YES
  • CustomerId must be unique
  • If the user enabled Portfolio Margin, please user relevant /papi endpoint

Response:

{
    "brokerId": "ABCD1234",
    "customerId": "abc123"
}

Get Income History(USER DATA)

GET /fapi/v1/income

Weight:100

Parameters:

Name Type Mandatory Description
symbol STRING NO
incomeType STRING NO "TRANSFER","WELCOME_BONUS", "REALIZED_PNL","FUNDING_FEE", "COMMISSION", and "INSURANCE_CLEAR"
startTime LONG NO Timestamp in ms to get funding from INCLUSIVE.
endTime LONG NO Timestamp in ms to get funding until INCLUSIVE.
limit INT NO Default 100; max 1000
recvWindow LONG NO
timestamp LONG YES
  • If incomeType is not sent, all kinds of flow will be returned
  • If startTime and endTime are not sent, the most recent limit datas will be returned.
  • If the number of data between startTime and endTime is larger than limit, response will be return as startTime + limit.

Response:

[
    {
        "symbol": "",
        "incomeType": "TRANSFER",
        "income": "-0.37500000",
        "asset": "USDT",
        "info":"",  
        "time": 1570608000000,
    },
    {
        "symbol": "BTCUSDT",
        "incomeType": "COMMISSION", 
        "income": "-0.01000000",
        "asset": "USDT",
        "info":"",  
        "time": 1570636800000,
    }
]

Get Trader Number (USER DATA)

GET /fapi/v1/apiReferral/traderNum

Weight:100

Parameters:

Name Type Mandatory Description
type INT NO 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures
startTime LONG NO
endTime LONG NO
limit INT NO default 500, max 1000
recvWindow LONG NO
timestamp LONG YES

Response:

[
   {
      "newTrader": "1",
      "oldTrader": "2",
      "time": 1586736000000
   },
   { 
      "newTrader": "0",
      "oldTrader": "1",
      "time": 1586736000000
   }
]

Get Rebate Data Overview (USER DATA)

GET /fapi/v1/apiReferral/overview

Weight:100

Parameters:

Name Type Mandatory Description
type INT NO 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures
recvWindow LONG NO
timestamp LONG YES

Response:

{
   "brokerId": "ABCD1234",
   "newTraderRebateCommission":"0.30000000",
   "oldTraderRebateCommission":"0.20000000",
   "totalTradeUser":13,
   "unit": "USDT",
   "totalTradeVol": "405.54379000",
   "totalRebateVol": "0.01833800",
   "time": 1597708800000
}

Get User Trade Volume (USER DATA)

GET /fapi/v1/apiReferral/tradeVol

Weight:100

Parameters:

Name Type Mandatory Description
type INT NO 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures
startTime LONG NO
endTime LONG NO
limit INT NO default 500, max 1000
recvWindow LONG NO
timestamp LONG YES

Response:

[
   {
      "unit": "USDT",
      "tradeVol": "53.60756000",
      "time": 1586736000000
   },
   { 
      "unit": "USDT",
      "tradeVol": "43.60756000",
      "time": 1588723200000
   }
]

Get Rebate Volume (USER DATA)

GET /fapi/v1/apiReferral/rebateVol

Weight:100

Parameters:

Name Type Mandatory Description
type INT NO 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures
startTime LONG NO
endTime LONG NO
limit INT NO default 500, max 1000
recvWindow LONG NO
timestamp LONG YES

Response:

[
   {
      "unit": "USDT",
      "rebateVol": "0.00023200",
      "time": 1586736000000
   },
   { 
      "unit": "USDT",
      "rebateVol": "0.00064800",
      "time": 1588723200000
   }
]

Get Trader Detail (USER DATA)

GET /fapi/v1/apiReferral/traderSummary

Weight:100

Parameters:

Name Type Mandatory Description
customerId STRING NO
type INT NO 1:USDT Margined Futures, 2:COIN Margined Futures Default: USDT Margined Futures
startTime LONG NO
endTime LONG NO
limit INT NO default 500, max 1000
recvWindow LONG NO
timestamp LONG YES

Response:

[
   {
      "customerId": "sde001",
      "unit": "USDT",
      "tradeVol":"9.57083000",
      "rebateVol":"0.00035400",
      "time": 1586736000000
   },
   { 
      "customerId": "ft****@gmail.com",
      "unit": "USDT",
      "tradeVol":"9.66741000",
      "rebateVol":"0.00034800",
      "time": 1588723200000
   }
]

Query Client If The New User (USER DATA)(PAPI)

GET /papi/v1/apiReferral/ifNewUser

Weight: 100

Parameters:

Name Type Mandatory Description
brokerId STRING YES
type INT NO 1:USDT-margined Futures, 2: Coin-margined Futures ; Default:1:USDT-margined Futures
recvWindow LONG NO
timestamp LONG YES

Response:

{
    "brokerId": "ABCD1234",
    "rebateWorking":false, 
    "ifNewUser": true 
}

Customize Id For Client (USER DATA)(For client)(PAPI)

POST /papi/v1/apiReferral/userCustomization

Weight: 100

Parameters:

Name Type Mandatory Description
customerId STRING YES
brokerId STRING YES
recvWindow LONG NO
timestamp LONG YES
  • CustomerId must be unique

Response:

{
    “brokerId”: “ABCD1234”,
    "customerId": "abc123"
}

Get User’s Customize Id (USER DATA)(PAPI)

GET /papi/v1/apiReferral/userCustomization

Weight: 100

Parameters:

Name Type Mandatory Description
brokerId STRING YES
recvWindow LONG NO
timestamp LONG YES

Response:

{
    “brokerId”: “ABCD1234”,
    "customerId": "abc123"
}