Skip to main content

Get Batch Export Report Status

Query the status and download URL of every task in a batch using the batchId returned by Batch Request Export Reports.

info
  • Rate limit: 20 requests per second, per UID and endpoint.
  • The recommended polling interval is 30 seconds.
  • The batch must be accessible to the authenticated user.
  • When a task's status is 2, its url contains a JSON-encoded string with Basepath and Files. For all other statuses, url is an empty string.
  • The batch has finished processing when every task has status 2 (succeeded) or -1 (failed). Check each task's status to determine whether its report was generated successfully.

HTTP Request​

GET /v5/fht/compliance/tax/private/batch_query

Request Parameters​

Pass the parameter in the query string.

ParameterRequiredTypeComments
batchIdtruestringBatch ID in UUID format, returned by Batch Request Export Reports.

Response Parameters​

ParameterTypeComments
itemsarrayList of task objects in the batch.
> typestringReport type. See supported report types.
> numberstringReport subcategory number, used together with type.
> statusinteger (int32)
  • 0: Queued
  • 1: Processing
  • 2: Succeeded
  • -1: Failed
> urlstringDownload URL. Populated when status is 2; otherwise, an empty string. URL of files (Basepath + Files). To shorten the time it takes to generate the report, it could generate multiple files. Do take note of this and combine the several files using the same base path when requesting the data export
> queryIdstringReport generation query ID for the task. Populated while the task is processing or after completion.

Request Example​

GET /v5/fht/compliance/tax/private/batch_query?batchId=b5f4a3e2-1c8d-4f96-9a03-2e7b8c6d4f10 HTTP/1.1
Host: api.bybit.com
X-BAPI-SIGN-TYPE: 2
X-BAPI-SIGN: xxxxxxxxxxxxxx
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1790035230000
X-BAPI-RECV-WINDOW: 5000

Response Example​

{
"retCode": 0,
"retMsg": "",
"result": {
"items": [
{
"type": "TRADE",
"number": "1",
"status": 2,
"url": "{\"Basepath\":\"https://prod-bybit-tax-api-1705-rz.s3.ap-southeast-1.amazonaws.com/\",\"Files\":[\"20260929/6b1b3341-6940-47a7-b112-5949e496736f/_SUCCESS\",\"20260929/6b1b3341-6940-47a7-b112-5949e496736f/part-00000-92859919-c8bf-47ce-b349-9cdcf44e8045-c000.csv\",\"20260929/6b1b3341-6940-47a7-b112-5949e496736f/part-00997-92859919-c8bf-47ce-b349-9cdcf44e8045-c000.csv\"]}",
"queryId": "2104839833489960960"
},
{
"type": "EARN",
"number": "1",
"status": 2,
"url": "{\"Basepath\":\"https://prod-bybit-tax-api-1705-rz.s3.ap-southeast-1.amazonaws.com/\",\"Files\":[\"20260929/d64081bf-955b-4a96-b2f9-aa2f49760611/_SUCCESS\",\"20260929/d64081bf-955b-4a96-b2f9-aa2f49760611/part-00000-0f0a3b1a-cdd3-43d0-8afa-1159893220a8-c000.csv\",\"20260929/d64081bf-955b-4a96-b2f9-aa2f49760611/part-00001-0f0a3b1a-cdd3-43d0-8afa-1159893220a8-c000.csv\"]}",
"queryId": "2104839833871642624"
},
{
"type": "DEPOSIT&WITHDRAWAL",
"number": "1",
"status": 2,
"url": "{\"Basepath\":\"https://prod-bybit-tax-api-1705-rz.s3.ap-southeast-1.amazonaws.com/\",\"Files\":[\"20260929/db47d025-ba66-4dee-98b8-8860d891fdb9/_SUCCESS\",\"20260929/db47d025-ba66-4dee-98b8-8860d891fdb9/part-00000-a8f75a9b-637f-4865-af11-5e4609e4a415-c000.csv\"]}",
"queryId": "2104839834236547072"
}
]
},
"retExtInfo": {},
"time": 1790669270665
}

Error Codes​

See Tax Error Codes.