import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.data.operations.exportTransactions({
type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING",
firstDate: "2023-05-01",
lastDate: "2023-05-02",
options: {
includeChains: [
"p-chain",
],
},
});
console.log(result);
}
run();{
"operationId": "<string>",
"operationType": "TRANSACTION_EXPORT_PRIMARY_NETWORK",
"operationStatus": "RUNNING",
"createdAtTimestamp": 123,
"updatedAtTimestamp": 123,
"message": "<string>",
"metadata": {
"code": "ErrInvalidRequest",
"downloadUrl": "<string>",
"nextDate": "<string>"
}
}Trigger a transaction export operation with given parameters.
The transaction export operation runs asynchronously in the background. The status of the job can be retrieved from the /v1/operations/:operationId endpoint using the operationId returned from this endpoint.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche();
async function run() {
const result = await avalanche.data.operations.exportTransactions({
type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING",
firstDate: "2023-05-01",
lastDate: "2023-05-02",
options: {
includeChains: [
"p-chain",
],
},
});
console.log(result);
}
run();{
"operationId": "<string>",
"operationType": "TRANSACTION_EXPORT_PRIMARY_NETWORK",
"operationStatus": "RUNNING",
"createdAtTimestamp": 123,
"updatedAtTimestamp": 123,
"message": "<string>",
"metadata": {
"code": "ErrInvalidRequest",
"downloadUrl": "<string>",
"nextDate": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://developers.avacloud.io/llms.txt
Use this file to discover all available pages before exploring further.
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
Successful response
TRANSACTION_EXPORT_PRIMARY_NETWORK, TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING, TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE, TRANSACTION_EXPORT_EVM RUNNING, COMPLETED, COMPLETED_WITH_WARNING, FAILED Show child attributes
Was this page helpful?