Assets API

Use the Assets API to manage the Assets that will be used with the Ledgers.

Refer to Assets API in the Requests and Responses page for more information about the parameters.

Create an Asset

POST /v1/organizations/{{id}}/ledgers/{{id}}/assets

Use this endpoint to create an Asset that will be used with the transactions. Each Asset must be created one at a time.

Each Asset has decimal place settings and other specific parameters that will be created individually.

You must create the Asset twice with different configurations to use the same Asset (e.g. BTC) on two Ledgers with different configurations.

Headers

Request body
{
   "name":"Bitcoin",
   "type":"crypto", //crypto, currency (according to ISO 4217), commodity, others
   "code":"BTC",
   "metadata":{
      "internalExchangeAddress":"bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
      "internalExchangeCustody":"Binance US"
   },
   "status":{ //optional, default status.code = ACTIVE and description = null
      "code":"ACTIVE",
      "description":null
   }
}

Response codes

{
   "id":"bb907427-5a8c-4622-b1ce-801b70e40d0c",
   "organizationId":"cc15194a-6bc9-4ebb-b15d-43411a54ba4b",
   "ledgerId":"77b0fb8b-1bd9-4810-9c6d-7e80064fab0c",
   "name":"Bitcoin",
   "type":"crypto",
   "code":"BTC", //sempre MAIÚSCULO
   "metadata":{
      "internalExchangeAddress":"bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
      "internalExchangeCustody":"Binance US"
   },
   "status":{
      "code":"ACTIVE",
      "description":null
   },
   "createdAt":"2024-02-08T17:03:12+0300",
   "updatedAt":"2024-02-08T17:03:12+0300",
   "deletedAt":null
}

Retrieve all Assets

GET /v1/organizations/{{id}}/ledgers/{{id}}/assets?type={{type}}

Use this endpoint to retrieve the information of all Asset to which a user has access.

Headers

Query parameters

Response codes

[
   {
      "id":"bb907427-5a8c-4622-b1ce-801b70e40d0c",
      "ledgerId":"e04cdf8b-0c8e-451e-881d-74d409936aee",
      "organizationId":"5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
      "name":"Bitcoin",
      "type":"crypto",
      "code":"BTC",
      "status":{
         "code":"002",
         "description":"Blocked"
      },
      "metadata":{
         "internalExchangeAddress":"bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
         "internalExchangeCustody":"Binance US"
      }
   },
   {
      "id":"f9e838d6-d3a7-4975-b681-613999537d2e",
      "ledgerId":"c3a89e04-b1cd-4df8-a5f9-0bb077e07e6d",
      "organizationId":"5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
      "name":"Real",
      "type":"currency",
      "code":"BRL",
      "status":{
         "code":"001",
         "description":"Active"
      },
      "metadata":{
         "localBank":"c6"
      }
   },
   {
      "id":"174ef9b1-21b3-40ce-a008-2a8e6b0b532a",
      "ledgerId":"8357fd78-81a8-4075-a399-863b3d39779e",
      "organizationId":"5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
      "name":"Chainlink",
      "type":"crypto",
      "code":"LINK",
      "status":{
         "code":"001",
         "description":"Active"
      },
      "metadata":{
         "priceIn2025":200.98,
         "priceCurrency":"USD"
      }
   }
]

Retrieve Asset by id

GET /v1/organizations/{{id}}/ledgers/{{id}}/assets/{{id}}

Use this endpoint to retrieve the information of a specific Asset using the identifier (id).

Headers

Response codes

{
   "id":"bb907427-5a8c-4622-b1ce-801b70e40d0c",
   "ledgerId":"e04cdf8b-0c8e-451e-881d-74d409936aee",
   "organizationId":"5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
   "name":"Bitcoin",
   "type":"crypto",
   "code":"BTC",
   "status":{
      "code":"001",
      "description":"Active"
   },
   "metadata":{
      "internalExchangeAddress":"bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
      "internalExchangeCustody":"Binance US"
   }
}

Update an Asset

PATCH /v1/organizations/{{id}}/ledgers/{{id}}/assets/{{id}}

Use this endpoint to edit and update the information of a specific Asset. When you update an Asset, the following fields can be edited:

  • name

  • status

  • metadata

When updating the metadata object, all previous key-value pairs must be included in the update, or they will be removed.

Headers

Request body
{
  "name": "Brazilian Real",
  "status": {
    "code": "003",
    "description": "Pre-launch"
  },
  "metadata": {
    "cfo": "Satoshi Nakamoto"
  }
}

Response codes

{
  "id": "f9e838d6-d3a7-4975-b681-613999537d2e",
  "ledgerId": "c3a89e04-b1cd-4df8-a5f9-0bb077e07e6d",
  "organizationId": "5f3a4c55-8b28-4276-bed7-f7c8a4bb44e8",
  "name": "Brazilian Real",
  "type": "currency",
  "code": "BRL",
  "status": {
    "code": "003",
    "description": "Pre-launch"
  },
  "metadata": {
    "cfo": "Satoshi Nakamoto"
  },
  "createdAt": "2024-02-08T17:03:12+0300",
  "updatedAt": "2024-02-08T17:03:12+0300",
  "deletedAt": null
}

Delete an Asset

DELETE /v1/organizations/{{id}}/ledgers/{{id}}/assets/{{id}}

Use this endpoint to deactivate a specific Asset.

An Asset can only be deleted if no balance is available in its ledger accounts. Therefore, all remaining amounts must be moved to the External Account before deleting an Asset.

Headers

Response codes

Last updated