Skip to main content
POST
/
subaccounts
/
transactions
/
allocations
Create new allocations
curl --request POST \
  --url https://api.anchorage-staging.com/v2/subaccounts/transactions/allocations \
  --header 'Api-Access-Key: <api-key>' \
  --header 'Api-Signature: <api-signature>' \
  --header 'Api-Timestamp: <api-timestamp>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "allocations": [
    {
      "amount": "1000.00",
      "assetType": "USD",
      "subaccountId": "ec761b5e-fd2c-497a-a9a0-f8738ac97bdf"
    }
  ],
  "idempotentId": "12838927347"
}
'
{
  "idempotentId": "12838927347",
  "transactionIds": [
    "<string>"
  ]
}
Signed and idempotent. The signer injects idempotentId into the body before computing the signature.

Authorizations

Api-Access-Key
string
header
required

An API key associated with a security role

Headers

Api-Signature
string
required

A hex-encoded Ed25519 signature of timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body.

Construction example:

toHex(
ed25519Sign(
signing_key,
'{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)
)
)
Pattern: ^[0-9A-Fa-f]{128,160}$
Api-Timestamp
integer<int64>
required

Current timestamp, represented as unix epoch seconds

Body

application/json

Details of the allocations to create

allocations
CreateFundingAllocation · object[]
required
Required array length: 1 - 100 elements
idempotentId
string
required

A client-provided unique ID for idempotent requests

Maximum string length: 128
Example:

"12838927347"

Response

Successfully created the transactions

idempotentId
string
required

A client-provided unique ID for idempotent requests

Maximum string length: 128
Example:

"12838927347"

transactionIds
string[]