POST
/
v1
/
ledger
/
{ledger_key}
/
asset
curl --request POST \
  --url https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/asset \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "asset_code": "<string>",
  "name": "<string>",
  "scale": 1,
  "symbol": "<string>",
  "metadata": {}
}'
{
  "asset_code": "<string>",
  "name": "<string>",
  "scale": 1,
  "symbol": "<string>",
  "metadata": {}
}

Headers

Authorization
string
required

The Basic Authentication header. Format: "Basic {base64(orgID:apiKey)}"

Path Parameters

ledger_key
string
required

The key of the ledger. Examples:

  • "123e4567-e89b-12d3-a456-426614174000"
  • "id:123e4567-e89b-12d3-a456-426614174000"
  • "ref:ledger:customer_a"

Body

application/json
asset_code
string
required

The code of the asset - needs to be unique for the asset, can be anything from a currency ISO code, such as USD or a share ticker, such as AAPL, or something else entirely. Can optionally also include a scale, such as USD:2, or USD:6 to represent the number of decimal places to use for the asset. The Asset classification is entirely up to the client.

Minimum length: 1
scale
integer
required

The number of decimal places to use for the asset. Defaults to 2 if not set, so a scale of 2 would mean 100 is 100/(10^2) = 1.00 units of the asset

Required range: x >= 0
name
string

The name of the asset

Minimum length: 1
symbol
string

The symbol of the asset, such as $ for USD, or AAPL for Apple shares

metadata
object

Additional, optional, metadata for the asset

Response

200 - application/json
The request has succeeded.
asset_code
string
required

The reference of the asset

Minimum length: 1
name
string
required

The name of the asset

scale
integer
required

The scale of the asset. Defines the power of 10 to use for the asset. For example, a scale of 2 would mean 100 is 100/(10^2) = 1.00 units of the asset

Required range: x >= 0
symbol
string

The symbol of the asset

metadata
object

Additional, optional, metadata for the asset