Accounts

GET /accounts


Get a list of accounts

Response

OK

{
  "success": true,
  "data": []model.Account
}

Error

  • error.InternalServerError

GET /bookings/accounts/:account_id/balance


Get a list of all balances for an account

Response

OK

{
  "success": true,
  "data": {
    "EUR": {
      "withdrawing": "4997.74",
      "trading": "4997.74",
      "total": "4997.74"
    },
    "FTM": {
      "withdrawing": "-500",
      "trading": "0",
      "total": "0"
    }
  }
}

Error

  • error.BadRequestError
  • error.InternalServerError

GET /accounts/matchings


Get a list of all matchings. A matching contains an account an asset and address. If Transaction is submitted or integrated for the asset that contains the address, the transaction is assigned to the account.

Query parameters

  • id
  • account_id

Response

OK

{
  "success": true,
  "data": []Model.Matching
}

Error

  • error.BadRequestError
  • error.InternalServerError

POST /accounts/matchings


Add a new matching.

Request

{
  "resource_id": "0306ce84-def9-4400-a977-be1a150e6728",
  "type": "DESTINATION_WITH_REFERENCE",
  "workspace": "trever",
  "details": {
    "asset": "XLM",
    "is_withdrawal_matching": true,
    "destination_address": "GA5XIGA5C7QTPTWXQHY6MCJRMTRZDOSHR6EFIBNDQTCQHG262N4GGKTM",
    "reference": "A Reference Text"
  }
}

Attributes

  • resource_id: The account that is matched.
  • type: Enum.MatchingType
  • details
    • asset: The asset to be matched for.
    • is_withdrawal_matching: If True then the matching for withdrawals is valid. If False then it applies to deposits.
    • destination_address: If the address specified here is the destination of a transaction, the transaction is assigned to the account in resource_id. Only used for type DESTINATION_WITH_REFERENCE and DESTINATION_WITHOUT_REFERENCE.
    • source_address: If the address specified here is the source of a transaction, the transaction is assigned to the account in resource_id. Only used for type SOURCE_WITH_REFERENCE and SOURCE_WITHOUT_REFERENCE.
    • reference: If several accounts are matched to the same address, an additional reference can be used. Only used for type DESTINATION_WITH_REFERENCE and SOURCE_WITH_REFERENCE.

Response

OK

{
  "success": true,
  "data": Model.Matching
}

Error

  • error.BadRequestError
  • error.InternalServerError

PUT /accounts/matchings


Edit a matching.

Request

{
  "id": "1bee8132-75ee-4d45-9fe1-1dc0c45324b7",
  "resource_id": "0306ce84-def9-4400-a977-be1a150e6728",
  "type": "DESTINATION_WITH_REFERENCE",
  "workspace": "trever",
  "details": {
    "asset": "XLM",
    "is_withdrawal_matching": true,
    "destination_address": "GA5XIGA5C7QTPTWXQHY6MCJRMTRZDOSHR6EFIBNDQTCQHG262N4GGKTM",
    "reference": "A Reference Text"
  }
}

Attributes

  • id: The ID of the matching that should be edited.
  • resource_id: The account that is matched.
  • type: Enum.MatchingType
  • details
    • asset: The asset to be matched for.
    • is_withdrawal_matching: If True then the matching for withdrawals is valid. If False then it applies to deposits.
    • destination_address: If the address specified here is the destination of a transaction, the transaction is assigned to the account in resource_id. Only used for type DESTINATION_WITH_REFERENCE and DESTINATION_WITHOUT_REFERENCE.
    • source_address: If the address specified here is the source of a transaction, the transaction is assigned to the account in resource_id. Only used for type SOURCE_WITH_REFERENCE and SOURCE_WITHOUT_REFERENCE.
    • reference: If several accounts are matched to the same address, an additional reference can be used. Only used for type DESTINATION_WITH_REFERENCE and SOURCE_WITH_REFERENCE.

Response

OK

{
  "success": true,
  "data": Model.Matching
}

Error

  • error.BadRequestError
  • error.InternalServerError

DELETE /accounts/matchings/:matching_id


Delete a matching.

Response

OK

{
  "success": true,
  "data": Model.Matching
}

Error

  • error.BadRequestError
  • error.InternalServerError