Skip to main content
POST
/
api
/
v1
/
exports
{
  "success": false,
  "error": {
    "code": "INVALID_DATE_RANGE",
    "message": "end_date must be after start_date",
    "field": "filters.end_date"
  }
}

Authentication

This endpoint requires authentication via Bearer token.
Authorization: Bearer YOUR_API_KEY

Request Body

workspace_id
string
required
The workspace ID to export data from
format
string
required
Export format
  • csv - Spreadsheet-compatible CSV file
  • pdf - Professional PDF report with charts
  • json - Raw JSON data (for programmatic use)
report_type
string
PDF report template (required if format is pdf)
  • summary - High-level overview with charts
  • detailed - Transaction-by-transaction listing
  • tax - Tax-ready report organized by category
  • audit - Comprehensive report with attachments
filters
object
columns
array
CSV-specific: Array of column names to include (optional, defaults to all)
  • date
  • tx_hash
  • from_address
  • to_address
  • wallet_label
  • chain
  • token
  • amount
  • fiat_value
  • direction
  • type
  • tags
  • notes
  • attachments
options
object
delivery
object

Response

For download method (immediate, small exports)

success
boolean
Indicates if the export was created successfully
data
object

For email or webhook methods (async, large exports)

success
boolean
Indicates if the export job was queued successfully
data
object

Example Requests

CSV Export (Basic)

curl -X POST "https://api.cryptotally.xyz/v1/exports" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "ws_123",
    "format": "csv",
    "filters": {
      "start_date": "2024-01-01",
      "end_date": "2024-12-31",
      "direction": "inflow"
    },
    "delivery": {
      "method": "download"
    }
  }'

PDF Tax Report

{
  "workspace_id": "ws_123",
  "format": "pdf",
  "report_type": "tax",
  "filters": {
    "start_date": "2024-01-01",
    "end_date": "2024-12-31"
  },
  "options": {
    "currency": "USD",
    "pdf_title": "CryptoTally Tax Report 2024",
    "include_logo": true
  },
  "delivery": {
    "method": "email",
    "email_recipients": ["accountant@example.com", "me@example.com"]
  }
}

Custom CSV with Specific Columns

{
  "workspace_id": "ws_123",
  "format": "csv",
  "filters": {
    "tag_ids": ["tag_customer"],
    "start_date": "2024-01-01",
    "end_date": "2024-03-31"
  },
  "columns": [
    "date",
    "token",
    "amount",
    "fiat_value",
    "tags",
    "notes"
  ],
  "options": {
    "date_format": "MM/DD/YYYY",
    "currency": "USD",
    "include_summary": true
  },
  "delivery": {
    "method": "download"
  }
}

Example Response

{
  "success": true,
  "data": {
    "id": "exp_abc123",
    "status": "completed",
    "format": "csv",
    "download_url": "https://storage.cryptotally.xyz/exports/exp_abc123.csv?token=xyz789&expires=1711065600",
    "file_size": 145678,
    "transaction_count": 147,
    "created_at": "2024-03-20T10:30:00Z",
    "expires_at": "2024-03-21T10:30:00Z"
  }
}

Downloading the Export

Once you receive the download_url, download the file:
curl -O "https://storage.cryptotally.xyz/exports/exp_abc123.csv?token=xyz789&expires=1711065600"
Download URLs expire after 24 hours. If the link expires, create a new export request.

Export Templates

Annual Tax Export (US)

{
  "workspace_id": "ws_123",
  "format": "csv",
  "filters": {
    "start_date": "2024-01-01",
    "end_date": "2024-12-31"
  },
  "columns": ["date", "token", "amount", "fiat_value", "direction", "tags", "notes"],
  "options": {
    "currency": "USD",
    "date_format": "MM/DD/YYYY",
    "group_by": "month"
  }
}

Quarterly Business Report

{
  "workspace_id": "ws_123",
  "format": "pdf",
  "report_type": "summary",
  "filters": {
    "start_date": "2024-01-01",
    "end_date": "2024-03-31"
  },
  "options": {
    "pdf_title": "Q1 2024 Financial Summary",
    "include_logo": true
  }
}

Vendor Expense Report

{
  "workspace_id": "ws_123",
  "format": "csv",
  "filters": {
    "direction": "outflow",
    "tag_ids": ["tag_vendor"],
    "start_date": "2024-01-01",
    "end_date": "2024-12-31"
  },
  "options": {
    "group_by": "tag"
  }
}

Error Responses

{
  "success": false,
  "error": {
    "code": "INVALID_DATE_RANGE",
    "message": "end_date must be after start_date",
    "field": "filters.end_date"
  }
}

Rate Limits & Quotas

TierMax Transactions per ExportExports per HourConcurrent Exports
Free1,000101
Pro50,0001005
EnterpriseUnlimitedUnlimited20

Checking Export Status

For async exports (email/webhook delivery):
GET /api/v1/exports/:export_id
Response:
{
  "success": true,
  "data": {
    "id": "exp_abc123",
    "status": "processing",
    "progress": 67,
    "estimated_completion": "2024-03-20T10:35:00Z"
  }
}

Webhook Notification

If you use webhook delivery method, CryptoTally will POST to your URL when the export is ready:
{
  "event": "export.completed",
  "export_id": "exp_abc123",
  "format": "csv",
  "download_url": "https://storage.cryptotally.xyz/exports/exp_abc123.csv?token=xyz789",
  "transaction_count": 147,
  "file_size": 145678,
  "expires_at": "2024-03-21T10:30:00Z"
}

Best Practices

Instead of exporting all-time data, break it into yearly or quarterly exports.
Large exports consume resources. Run them during low-traffic periods.
Download and store exports in a secure location for record-keeping.
Don’t wait for large exports to complete. Get notified when ready.