POST
/
v1
/
operations
/
transactions:export
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";

const avaCloudSDK = new AvaCloudSDK({
  serverURL: "https://api.example.com",
  chainId: "43114",
  network: "mainnet",
});

async function run() {
  const result = await avaCloudSDK.data.operations.postTransactionExportJob({
    type: "TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING",
    firstDate: "2023-05-01",
    lastDate: "2023-05-02",
    options: {
      includeChains: [
        "p-chain",
      ],
    },
  });

  // Handle the result
  console.log(result);
}

run();
{
  "operationId": "<string>",
  "operationType": "TRANSACTION_EXPORT_PRIMARY_NETWORK",
  "operationStatus": "RUNNING",
  "message": "<string>",
  "metadata": {
    "code": "ErrInvalidRequest",
    "downloadUrl": "<string>",
    "nextDate": "<string>"
  },
  "createdAtTimestamp": 123,
  "updatedAtTimestamp": 123
}

Authorizations

x-glacier-api-key
string
header
required

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.

Body

application/json
type
enum<string>
required
Available options:
TRANSACTION_EXPORT_EVM
options
object
required
firstDate
string
Example:

"2023-05-01"

lastDate
string
Example:

"2023-05-02"

startDate
string
deprecated
Example:

"2023-05-01"

endDate
string
deprecated
Example:

"2023-05-02"

Response

201
application/json
Successful response
operationId
string
required
operationType
enum<string>
required
Available options:
TRANSACTION_EXPORT_PRIMARY_NETWORK,
TRANSACTION_EXPORT_PRIMARY_NETWORK_STAKING,
TRANSACTION_EXPORT_PRIMARY_NETWORK_SIMPLE,
TRANSACTION_EXPORT_EVM
operationStatus
enum<string>
required
Available options:
RUNNING,
COMPLETED,
COMPLETED_WITH_WARNING,
FAILED
createdAtTimestamp
number
required
updatedAtTimestamp
number
required
message
string
metadata
object