curl --request POST \
--url http://localhost/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"
}
]
}
'{
"data": [
{
"timestamp": "2023-11-07T05:31:56Z",
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"txid": 1,
"reference": "ref:001",
"metadata": {},
"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
}
}
}
}
]
}curl --request POST \
--url http://localhost/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"
}
]
}
'{
"data": [
{
"timestamp": "2023-11-07T05:31:56Z",
"postings": [
{
"amount": 100,
"asset": "COIN",
"destination": "users:002",
"source": "users:001"
}
],
"txid": 1,
"reference": "ref:001",
"metadata": {},
"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
}
}
}
}
]
}The access token received from the authorization server in the OAuth 2.0 flow.
Name of the ledger.
"ledger001"
Show child attributes
"ref:001"
OK
Show child attributes
x >= 0"ref:001"
Show child attributes
Show child attributes
{
"USD": { "input": 100, "output": 10, "balance": 90 },
"EUR": { "input": 100, "output": 10, "balance": 90 }
}{
"orders:1": {
"USD": { "input": 100, "output": 10, "balance": 90 }
},
"orders:2": {
"USD": { "input": 100, "output": 10, "balance": 90 }
}
}Show child attributes
Show child attributes
{
"USD": { "input": 100, "output": 10, "balance": 90 },
"EUR": { "input": 100, "output": 10, "balance": 90 }
}{
"orders:1": {
"USD": { "input": 100, "output": 10, "balance": 90 }
},
"orders:2": {
"USD": { "input": 100, "output": 10, "balance": 90 }
}
}