Appearance
Exports
Methods related to exporting data from WAPI to CSV files for download.
Quick Reference
| Method | Description |
|---|---|
| exportBalanceHistory | Output balanceHistory query to an Export |
| exportBalances | Search for Balances using either a simple filter or queryBuilder and save the results to an Export |
| exportTokens | Search for Tokens using either a simple filter or queryBuilder and save the results to an Export |
| exportTransferGroups | Search for TransferGroups using either a simple filter or queryBuilder and save the results to an Export |
| exportTransfers | Search for Transfers using either a simple filter or queryBuilder and save the results to an Export |
| exportWallets | Search for Wallets using either a simple filter or queryBuilder and save the results to an Export |
| getExport | Get an Export file description |
| listExports | List Export entities by type or time |
exportBalanceHistory
Output balanceHistory query to an Export
ts
await TEST.client.exportBalanceHistory(
{
wallet: 'newWallet',
token: 'USD',
},
{
limit: 0,
select: [
'transfer_identifier',
'pending_amount',
'finished_amount',
'pending_amount_from',
'pending_amount_to',
'amount',
],
offset: 0,
order: 'desc',
// GENERALOPTIONS
},
);ts
{
export: {
identifier: 'b-2026-01-26T134618414Z-9084.csv',
type: 'balances',
created_at: '2026-01-01T10:00:00.000Z',
status: 'started',
fields: [
'transfer_identifier',
'pending_amount',
'pending_amount_to',
'pending_amount_from',
'finished_amount',
'amount'
]
}
};exportBalanceHistoryFnInput
Input for exportBalanceHistory
| Attribute | Type | Required | Description |
|---|---|---|---|
token | string | number | Id of the token to withdrawal as | |
wallet | string | number | ✓ | Id of the wallet to withdraw from |
options | {} | Optional flags for input |
exportBalanceHistoryFnOutput
Output of exportBalanceHistory
| Attribute | Type | Always | Description |
|---|---|---|---|
export | {} | Information about exported file |
exportBalances
Search for Balances using either a simple filter or queryBuilder and save the results to an Export
ts
await client
.exportBalances()
// .whereIn('wallet', ['test-1', 'test-2'])
.where('wallet', 'like', 'test-%')
.limit(5)
.offset(0)
.orderBy('available_balance')
.select('wallet_foreign', 'token_foreign', 'available_balance')
.options({
tracking_id: 'hello',
});ts
{
export: {
identifier: 'b-2026-01-26T134616979Z-bda6.csv',
type: 'balances',
created_at: '2026-01-01T10:00:00.000Z',
status: 'started',
fields: [
'wallet_foreign',
'token_foreign',
'available_balance'
]
}
};exportBalancesFnInput
Input for exportBalances
| Attribute | Type | Required | Description |
|---|---|---|---|
token | string | number | Token to get balance for | |
wallet | string | number | Wallet to get balance for | |
amount | string | number | Balance amount | |
available_balance | string | number | Balance amount available | |
pending_amount | string | number | Balance pending_amount | |
finished_amount | string | number | Balance finished_amount | |
metadata | | Metadata filter for custom properties | |
options | {} | Optional flags for input |
exportBalancesFnOutput
Output of exportBalances
| Attribute | Type | Always | Description |
|---|---|---|---|
export | {} | Information about exported file |
exportTokens
Search for Tokens using either a simple filter or queryBuilder and save the results to an Export
ts
await client
.exportTokens()
.whereMetadata('meta', '>', 2)
.where((builder) => {
builder.where('status', 'active').orWhere('type', 'value');
})
.limit(5)
.offset(0)
.orderBy('foreign')
.select('id', 'foreign', 'metadata', 'balance_available_balance')
.options({
tracking_id: 'hello',
include_balance: true,
});ts
{
export: {
identifier: 't-2026-01-26T134617581Z-77a1.csv',
type: 'tokens',
created_at: '2026-01-01T10:00:00.000Z',
status: 'started',
fields: [
'id',
'foreign',
'metadata',
'balance_available_balance'
]
}
};exportTokensFnInput
Input for exportTokens
| Attribute | Type | Required | Description |
|---|---|---|---|
foreign | string | number | Foreign of the token | |
type | | Type of the token | |
belongs_to | string | number | Foreign of the wallet connected to token | |
metadata | | Metadata filter for custom properties | |
options | {} | Optional flags for input |
exportTokensFnOutput
Output of exportTokens
| Attribute | Type | Always | Description |
|---|---|---|---|
export | {} | Information about exported file |
exportTransferGroups
Search for TransferGroups using either a simple filter or queryBuilder and save the results to an Export
ts
await client
.exportTransferGroups()
.whereMetadata('even', true)
.where((builder) => {
builder
.where('status', 'closed')
.orWhere('transfer_status', 'pending');
})
.limit(5)
.offset(0)
.orderBy('identifier')
.select('id', 'identifier', 'metadata', 'reverses_identifier')
.options({
tracking_id: 'hello',
return_transfers_count: true,
});ts
{
export: {
identifier: 'tg-2026-01-26T134615682Z-06a2.csv',
type: 'transfer_groups',
created_at: '2026-01-01T10:00:00.000Z',
status: 'started',
fields: [
'id',
'identifier',
'metadata',
'reverses_identifier',
'transfers_count'
]
}
};exportTransferGroupsFnInput
Input for exportTransferGroups
| Attribute | Type | Required | Description |
|---|---|---|---|
identifier | string | number | Identifier of the transfer_group | |
transfer_status | | Status of the transfers | |
status | | Status of the transfer_group | |
reverses | string | number | Identifier of the transfer_group the transfer_group reverses | |
type | | Type of the transfer group | |
metadata | | Metadata filter for custom properties | |
options | {} | Optional flags for input |
exportTransferGroupsFnOutput
Output of exportTransferGroups
| Attribute | Type | Always | Description |
|---|---|---|---|
export | {} | Information about exported file |
exportTransfers
Search for Transfers using either a simple filter or queryBuilder and save the results to an Export
ts
await client
.exportTransfers()
.where({
metadata: {
example: true,
},
})
.where('id', '>', 1)
.where((builder) => {
builder.where('status', 'finished').orWhere('type', 'deposit');
})
.limit(5)
.offset(0)
.orderBy(['token_id', { column: 'id', order: 'desc' }])
.select(
'id',
'type',
'from_wallet_foreign',
'to_wallet_foreign',
'amount',
)
.options({
tracking_id: 'hello',
});ts
{
export: {
identifier: 'tx-2026-01-26T134611648Z-ae75.csv',
type: 'transfers',
created_at: '2026-01-01T10:00:00.000Z',
status: 'started',
fields: [
'id',
'type',
'from_wallet_foreign',
'to_wallet_foreign',
'amount'
]
}
};exportTransfersFnInput
Input for exportTransfers
| Attribute | Type | Required | Description |
|---|---|---|---|
wallet | string | number | Foreign of the wallet connected to transfers | |
token | string | number | Foreign of the token transferred | |
from_wallet | string | number | Foreign of the wallet transfers are made from | |
to_wallet | string | number | Foreign of the wallet transfers are made to | |
transfer_group | string | number | Foreign of the transfer_group the transfers are a part of | |
type | | Type of the transfer | |
status | | Status of the transfers | |
metadata | | Metadata filter for custom properties | |
options | {} | Optional flags for input |
exportTransfersFnOutput
Output of exportTransfers
| Attribute | Type | Always | Description |
|---|---|---|---|
export | {} | Information about exported file |
exportWallets
Search for Wallets using either a simple filter or queryBuilder and save the results to an Export
ts
await client
.exportWallets()
.whereMetadata('meta', '>', 2)
.where((builder) => {
builder.where('status', 'active').orWhere('type', 'regular');
})
.limit(5)
.offset(0)
.orderBy('foreign')
.select('id', 'foreign', 'metadata', 'balance_available_balance')
.options({
tracking_id: 'hello',
include_balance_for_token: 'EUR',
});ts
{
export: {
identifier: 'w-2026-01-26T134617326Z-1a5b.csv',
type: 'wallets',
created_at: '2026-01-01T10:00:00.000Z',
status: 'started',
fields: [
'id',
'foreign',
'metadata',
'balance_available_balance'
]
}
};exportWalletsFnInput
Input for exportWallets
| Attribute | Type | Required | Description |
|---|---|---|---|
foreign | string | number | Wallet foreign | |
name | string | number | Wallet name | |
type | | Type of the wallet | |
status | | Current status for the wallet | |
metadata | | Metadata filter for custom properties | |
options | {} | Optional flags for input |
exportWalletsFnOutput
Output of exportWallets
| Attribute | Type | Always | Description |
|---|---|---|---|
export | {} | Information about exported file |
getExport
Get an Export file description
ts
await client.getExport(
{
identifier: exportingResult.export!.identifier,
},
{
return_signed_url: true,
tracking_id: 'myLogId',
},
);ts
{
export: {
identifier: 'tx-2026-01-26T134610834Z-26e9.csv',
status: 'completed',
type: 'transfers',
created_at: '2026-01-01T10:00:00.000Z',
completed_at: '2026-01-01T10:00:00.000Z',
size: '345',
fields: [
'id',
'identifier',
'from_wallet_foreign',
'to_wallet_foreign',
'amount',
'token_foreign',
'metadata',
'status',
'created_at',
'updated_at',
'status_finalized_at'
],
count: 1,
signed_url: 'https://storage.googleapis.com/wapi-test-exports/test/wapi_8a616d/tx-2026-01-26T134610834Z-26e9.csv?GoogleAccessId=wapi-api-test%40wapi-general-2024.iam.gserviceaccount.com&Expires=1769435471&Signature=PnFW7CUaDKmAAMqwWqCG9kEIXR%2B1mjB%2Fu9rK8%2BZaCLjzY4jnaaHDOWgica5W5sH5411aG3hPVuBW4yMN8h6iGCr3slIUtS5t7PFydAkLGGwcaOi%2Btrz9CZnjy3Tdg5VzuIaCw%2F9EUhuSUr9U9R2OxRU97J%2Fgeuw5VeFVlVNe42x8oAwylpGXf2LkOvEHYgcHouypWt0EiV3cWaIZjBRhPOXT%2FIhnIQ5SffqXxc9g7ScOCJUSxSXiGecHYUORbddzJfGxGjvWyvvPebzb27Iic2pJQgSqxQA%2Fyr6BKV5HQK8LDaHawdMQiew15TduCDBNUey27eKplVThQc1jBs8Iqw%3D%3D'
}
};getExportFnInput
Input for getExport
| Attribute | Type | Required | Description |
|---|---|---|---|
identifier | string | ✓ | File name of the export to get |
options | {} | Optional flags for input |
getExportFnOutput
Output of getExport
| Attribute | Type | Always | Description |
|---|---|---|---|
export | {} | Information about exported file |
listExports
List Export entities by type or time
ts
await client.listExports(
{
type: 'transfers',
},
{
order_by: 'created_at desc',
tracking_id: 'myLogId',
},
);ts
{
exports: [
{
identifier: 'tx-2026-01-26T134613506Z-edda.csv',
type: 'transfers',
status: 'completed',
size: '366',
created_at: '2026-01-01T10:00:00.000Z',
completed_at: '2026-01-01T10:00:00.000Z'
},
{
identifier: 'tx-2026-01-26T134613235Z-1957.csv',
type: 'transfers',
status: 'completed',
size: '345',
created_at: '2026-01-01T10:00:00.000Z',
completed_at: '2026-01-01T10:00:00.000Z'
}
]
};listExportsFnInput
Input for listExports
| Attribute | Type | Required | Description |
|---|---|---|---|
type | | type of the export | |
date | string | Date of the export | |
options | {} | Optional flags for input |
listExportsFnOutput
Output of listExports
| Attribute | Type | Always | Description |
|---|---|---|---|
exports | ({})[] | ✓ |