Skip to main content

Batch Request Export Reports

Request to export multiple types of tax reports in a batch. Reports are generated asynchronously. Use the returned batchId to query task status and download URLs.

Batch workflow:

  1. Call BatchCreate to submit multiple tax report export items and obtain batchId.
  2. Poll BatchQuery with batchId until every child task reaches a terminal status (2 or -1).
  3. Use the url returned for child tasks whose status is 2.
info
  • API key permission: Exchange History (read/write).
  • Rate limit: 5 requests per second, per UID and endpoint.
  • items must contain at least one item.
  • startTime must be within the last 18 months and earlier than endTime. The time range must not exceed 12 months.
  • A new batch cannot be submitted while an unfinished batch exists. The API returns error code 400004 in this case.

HTTP Request​

POST /v5/fht/compliance/tax/private/batch_create

Request Parameters​

ParameterRequiredTypeComments
startTimetrueinteger (int64)Report start time. UNIX timestamp in seconds, within the last 18 months.
endTimetrueinteger (int64)Report end time. UNIX timestamp in seconds. Must be later than startTime, with a time range of at most 12 months.
itemstruearrayList of report objects to export. At least one item is required.
> typetruestringReport type. Use ALL to export all supported report types for the current site. See supported report types.
> numbertruestringReport subcategory number, used together with type. The field is still required when type=ALL, but its value is ignored; pass an empty string (""). See supported report types.
sourceInstitutionfalsestringIdentifier of the institution making the request.
exportFileTypefalsestringExport file format: orc for ORC columnar format (default), or csv for CSV text format.

Report Types​

The supported type and number combinations depend on the site. bybit refers to Bybit; eu refers to Bybit EU.

typenumberReportSupported sites
ALLIgnored; use ""All supported reports for the current sitebybit, eu
TRADE1Spot tradingbybit, eu
TRADE2Contract tradingbybit
TRADE3USDC Options tradingbybit
TRADE4NFT tradingbybit
TRADE5Convertbybit, eu
TRADE6One-Click Buybybit, eu
P&L1Closed PnLbybit
EARN1Stakingbybit, eu
EARN2Liquidity Mining - Liquiditybybit
EARN3Liquidity Mining - Yieldbybit
EARN4Liquidity Mining - Swapbybit
EARN5Dual Assetbybit
EARN6DeFi Miningbybit
EARN7Launchpoolbybit, eu
EARN8Shark Finbybit
EARN9On-Chain Earnbybit, eu
EARN11Double Win ordersbybit, eu
EARN12Discount Buy ordersbybit, eu
EARN13Smart Leveragebybit, eu
DEPOSIT&WITHDRAWAL1Crypto depositsbybit, eu
DEPOSIT&WITHDRAWAL2P2Pbybit
DEPOSIT&WITHDRAWAL3Fiat deposits and withdrawalsbybit, eu
DEPOSIT&WITHDRAWAL4Express ordersbybit, eu
DEPOSIT&WITHDRAWAL5Third-party depositsbybit
DEPOSIT&WITHDRAWAL6Withdrawalsbybit, eu
DEPOSIT&WITHDRAWAL7NFT deposits and withdrawalsbybit
BONUS1Couponsbybit, eu
BONUS2Bonusesbybit, eu
AIRDROP1Airdropsbybit, eu
CARD1Bybit Card transactionsbybit, eu

Response Parameters​

ParameterTypeComments
batchIdstringUnique batch ID in UUID format. Use it to query the batch's task status and download URLs.

Request Example​

POST /v5/fht/compliance/tax/private/batch_create HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN-TYPE: 2
X-BAPI-SIGN: xxxxxxxxxxxxxx
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1790035200000
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"startTime": 1756684800,
"endTime": 1788220800,
"items": [
{ "type": "TRADE", "number": "1" },
{ "type": "EARN", "number": "1" },
{ "type": "DEPOSIT&WITHDRAWAL", "number": "1" }
],
"sourceInstitution": "INST_A",
"exportFileType": "csv"
}

Export All Report Types​

To export all report types supported by the current site, use the following request body. number is required but its value is ignored when type=ALL.

{
"startTime": 1756684800,
"endTime": 1788220800,
"items": [
{ "type": "ALL", "number": "" }
],
"exportFileType": "csv"
}

Response Example​

{
"retCode": 0,
"retMsg": "ok",
"result": {
"batchId": "b5f4a3e2-1c8d-4f96-9a03-2e7b8c6d4f10"
}
}

Error Codes​

See Tax Error Codes.