API Reference v3.0
- auth.v1
- API Reference
- ledger.v1
- GETShow server information
- GETGet information about a ledger
- GETList accounts from a ledger
- HEADCount the accounts from a ledger
- GETGet account by its address
- POSTAdd metadata to an account
- GETGet the mapping of a ledger
- PUTUpdate the mapping of a ledger
- POSTExecute a Numscriptdeprecated
- GETGet statistics from a ledger
- GETList transactions from a ledger
- POSTCreate a new transaction to a ledger
- HEADCount the transactions from a ledger
- GETGet transaction from a ledger by its ID
- POSTSet the metadata of a transaction by its ID
- POSTRevert a ledger transaction by its ID
- POSTCreate a new batch of transactions to a ledger
- GETGet the balances from a ledger's account
- GETGet the aggregated balances from selected accounts
- GETList the logs from a ledger
- GET
- ledger.v2
- payments.v1
- payments.v3
- search.v1
- webhooks.v1
- wallets.v1
- orchestration.v1
- orchestration.v2
- reconciliation.v1
ledger.v1
Create a new batch of transactions to a ledger
POST
/
api
/
ledger
/
{ledger}
/
transactions
/
batch
Copy
Ask AI
curl --request POST \
--url http://localhost:55001/api/ledger/{ledger}/transactions/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"transactions": [
{
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"reference": "ref:001",
"metadata": {},
"timestamp": "2023-11-07T05:31:56Z"
}
]
}'
Copy
Ask AI
{
"data": [
{
"timestamp": "2023-11-07T05:31:56Z",
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"reference": "ref:001",
"metadata": {},
"txid": 1,
"preCommitVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"postCommitVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
}
}
]
}
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Name of the ledger.
Example:
"ledger001"
Body
application/json
Response
200
application/json
OK
The response is of type object
.
Copy
Ask AI
curl --request POST \
--url http://localhost:55001/api/ledger/{ledger}/transactions/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"transactions": [
{
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"reference": "ref:001",
"metadata": {},
"timestamp": "2023-11-07T05:31:56Z"
}
]
}'
Copy
Ask AI
{
"data": [
{
"timestamp": "2023-11-07T05:31:56Z",
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"reference": "ref:001",
"metadata": {},
"txid": 1,
"preCommitVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
},
"postCommitVolumes": {
"orders:1": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
},
"orders:2": {
"USD": {
"input": 100,
"output": 10,
"balance": 90
}
}
}
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.