Version: current

STEP 6 - Perform Transactions

Perform a Transfer#

You can transfer assets from a specified FUND_ID to a counterparty in your Trusted Network. The transfer is subject to custodian approval.

The counterparties available are listed below.

  1. A specific Company Fund (specified COUNTERPARTY_COMPANY_ID and COUNTERPARTY_FUND_ID)
  2. A default Company Fund (specified COUNTERPARTY_COMPANY_ID)
  3. A default User Fund. (specified COUNTERPARTY_TRUSTED_PARTY_ID). The User must be a Trusted Party.

Default Funds must have been defined prior to performing a transfer.

The required fields are

  • fund_id The originator fund ID
  • expiration The time in epoch that the request must be approved or it will expire.
  • send symbol The asset symbol (BTC, ETH)
  • send amount The asset amount (in satoshis or weis)

Example perform a transfer request#

POST /company/{company_id}/transfer
-H "accept: application/json" \
-H "x-nonce: <ENTER_NONCE>" \
-H "x-timestamp: <ENTER_TIMESTAMP>" \
-H "x-sign: <YOUR_API_AUTHENTICATION_TOKEN>" \
-H "X-API-KEY: <YOUR_API_KEY_AUTHORIZATION>" \
-H "Content-Type: application/json"
-d "{
"fund_id": "<YOUR_FUND_ID>",
"counterparty_id": "<COUNTERPARTY_ID>",
"counterparty_fund_id": "<COUNTERPARTY_FUND_ID>",
"expires": <EPOCH_TIME>,
"benefit_of": "<COUNTERPARTY_NAME>",
"send": {
"symbol": "BTC",
"amount": 800
}

Example response#

A successful response returns a Transaction ID (tx_id).

{
"tx_id": "9827feec4eae4e80bda3daa7c3b97add"
}

Use the tx-id to view the status of a transaction in Step 8.

Perform a Withdrawal#

You can withdraw assets from a specified FUND_ID to a counterparty. The counterparty must be added to your Trusted Network. The counterparty address must first be whitelisted.

  1. Whitelist the counterparty address.

Example whitelist request#

POST /company/{company_id}/fund/{fund_id}/whitelist
-H "accept: application/json" \
-H "x-nonce: <ENTER_NONCE>" \
-H "x-timestamp: <ENTER_TIMESTAMP>" \
-H "x-sign: <YOUR_API_AUTHENTICATION_TOKEN>" \
-H "X-API-KEY: <YOUR_API_KEY_AUTHORIZATION>" \
-H "Content-Type: application/json"
-d "{
"name": "<MEMORABLE_NAME_FOR_COUNTERPARTY_ADDRESS>",
"asset": "<ASSET_SYMBOL>", //_e.g._BTC-TESTNET
"address": "<COUNTERPARTY_ADDRESS>"
}

Example whitelist response#

HTTP 200 OK

  1. Perform withdrawal to whitelisted address.

The required fields are

  • fund_id The originator fund ID.
  • expiration The time in epoch that the withdrawal expires if not approved by custodians.
  • address The whitelisted counterparty address for the withdrawal.
  • send symbol The asset symbol (BTC, ETH).
  • send amount The asset amount (in Satoshis or Gwei).

Example withdrawal request#

POST /company/{company_id}/withdraw
-H "accept: application/json" \
-H "x-nonce: <ENTER_NONCE>" \
-H "x-timestamp: <ENTER_TIMESTAMP>" \
-H "x-sign: <YOUR_API_AUTHENTICATION_TOKEN>" \
-H "X-API-KEY: <YOUR_API_KEY_AUTHORIZATION>" \
-H "Content-Type: application/json"
-d "{
"fund_id": "<FUND_ID>",
"address": "<WHITELISTED_COUNTERPARTY_ADDRESS>",
"expires": <EPOCH_TIME>,
"send": {
"symbol": "<ASSET_SYMBOL>",
"amount": <ASSET_AMOUNT>
}
}

Example withdrawal response#

A successful response returns a Transaction ID (tx_id)

{
"tx_id": "9827feec4eae4e80bda3daa7c3b97add"
}

Use the tx-id to view the status of a transaction in Step 8.