Transactions

Blockchain transactions have multiple value fields that may refer to different currencies. For example, amount is always expressed in the unit of the account (Bitcoin, ERC20, Ripple, ...). However max_fees will always be in Ethereum, even in the case of ERC20 transactions.

When fetching transactions, we will always express the value in the lowest available unit. For a Bitcoin account, the amount returned via GET /transactions will be in satoshi (sat).

You can inspect the units available via a call to GET /accounts/<id>/currency.

If you create a transaction, you must specify the unit to use to interpret both amount and max_fees. In this case amount and max_fees is not an integer but an object.

For that reason, they are represented as a map of two fields: unit and value.

For your convenience, you can choose any of the following representation to transfer 0.001 BTC:

  "amount": {
    "unit": "BTC",
    "value": "0.001"
  }
  "amount": {
    "unit": "mBTC",
    "value": "0.1"
  }
  "amount": {
    "unit": "bit",
    "value": "1000"
  }
  "amount": {
    "unit": "sat",
    "value": "100000"
  }

As the response is always expressed in the lowest unit, the reply will be

 "amount": "100000"