Fiat Transactions

Endpoints to post and manage fiat transactions for contracts

Post a Fiat Transaction

Whenever a Fiat Transaction such as a payment or interest / fees have been posted, a new Fiat Transaction can be added to the contract transactions. This will impact the current balance on the contract and will reflect in the history of the contract.

Request format

method: 'POST'
endpoint: '/api/external/arc/fiat-transaction'
headers: { 'Content-Type': 'application/json', 'X-API-KEY': 'your api key' }
body: {
  "contractId": "string",
  "transactionType": "balanceDecrease",
  "amount": 0,
  "currency": "usd",
  "description": "string",
  "timestamp": 0
}

Response format

{
  "_id": "123456789012",
  "contractId": "123456789012",
  "transactionType": "balanceDecrease",
  "previousBalance": 0,
  "currentBalance": 0,
  "amount": {
    "fiatValue": 0,
    "btcValue": 0,
    "currency": "usd",
    "exchangeRate": 0
  },
  "description": "string",
  "timestamp": 0
}

Response fields

Last updated