Export ledger entries
GEThttps://api.testnet.vega.rocks/api/v2/ledgerentry/export
Export ledger entries records ledger entries to a csv file. May or may not contain a date range - if no date range is provided, list all records for all times.
Ledger entries can be exported by:
- export ledger entries for a single party for a given asset within a given time range
- export ledger entries for a single party for a given asset for all times buf:lint:ignore RPC_RESPONSE_STANDARD_NAME buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
Request
Query Parameters
partyId stringrequired
Restrict exported ledger entries to those relating to the given party ID.
assetId string
Restrict exported ledger entries to those relating to the given asset ID.
dateRange.startTimestamp int64
Timestamp in Unix nanoseconds indicating the start of the date range.
dateRange.endTimestamp int64
Timestamp in Unix nanoseconds indicating the end of the date range.
Responses
- 200
- 500
- default
A successful response.(streaming responses)
- application/json
- Schema
- Example (from schema)
Schema
error object
result object
{
"error": {
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
},
"result": {
"contentType": "string",
"data": "string",
"extensions": [
{
"@type": "string"
}
]
}
}
An internal server error
- application/json
- Schema
- Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
- curl
- python
- go
- nodejs
- CURL
curl -L 'https://api.testnet.vega.rocks/api/v2/ledgerentry/export' \
-H 'Accept: application/json'