Skip to content

Partner API core concepts

This section presents a collection of Qredo and API specific terms and concepts, and presents various entities used within the API.

Before you continue, here's a list of some Qredo related concepts (click to expand):

Qredo-related terminology
  • Qredo Network (also interchangeable with Qredochain), the Qredo Network is a Layer 2 (L2) blockchain. Each transaction on Qredochain undergoes custody, which means that it is either approved or rejected in order to process. The native token on the Qredochain is the QRDO token [kh-ree-doh].
  • Custody - approval control over outgoing transactions of a Qredo Wallet. With Qredo, nearly all transactions out of any Qredo Wallet require an approval, regardless of asset type. Qredo accounts that perform custody using the Qredo Signing app are called approvers. Additionally, anyone with API access can set up a Core Client, which acts as a Partner API approver.
  • Qredo account is an account that can access their personal Qredochain assets and Wallets. You cannot work with the API unless you have a Qredo account. To create an account, you must use the combination of the Qredo Web App (in your web browser) and Qredo Signing app (on your mobile device).
  • Qredo Wallet is the browser-based software that allows you to access and manage your assets on the Qredochain.
  • Qredo Signing App is the mobile application that allows you to approve or reject transactions. There is no other way for a person to approve transactions: they must use the Qredo Signing app, which is available on iPhone and Android.
  • Asset might have different meanings depending on context. When used in singular, asset is often interchangeable with asset type and refers to a Level 1 crypto asset (such as BTC or ETH) that is available on the Level 2 Qredo blockchain. When used in plural, assets are often referred to as Wallet assets or transaction assets, meaning the asset type and amount in question (e.g. 1 BTC in a Wallet or in a transaction).

Partner API-specific concepts

For smooth Partner API operations experience, it is important that you are familiar with the list of concepts presented here (click to expand):

Partner API-specific terminology
  • company on the Qredo Network is an ID, part of a Qredo account, that holds funds and Wallets. You add approvers on a company level so each company has its own Trusted Network. Its members can be assigned to perform custody to funds and Wallets that the company holds. The company is equivalent to an organization in the Qredo Web App but it is not the same thing.
  • fund is the actual sub-entity to a company that holds Qredo Wallets and the approval rules for transactions with these Wallets: the so-called custodial policies. These policies also include the trusted parties that perform custody over transactions within that fund.
  • trusted_party is a Qredo approver: either a Qredo user or a Core client. Trusted parties belong to a company and form its trusted network. However, funds and Wallets must additionally appoint approvers out of the trusted network and that is when they become eligible to apply custody.
  • Custodial policies define number of approvals needed for processing a transaction out of a given Qredo Wallet. There are two types of custodial policies: policy_tx for transfers (moving assets from one Qredo Wallet to another) and policy_withdraw for withdrawals (moving assets from a Qredo Wallet to a L1 blockchain Wallet). Custodial policies apply per fund (fund policies) or per Wallets held by a fund (custom policies).
  • Signing Agent is an API-specific user type that performs custody: an API approver bot that can be further automated. It is implemented as a client-side software that connects to its dedicated Signing Agent service and has an approver identity which allows it to approve or reject transfer or withdrawal requests on the Qredochain. The Signing Agent instance is identified by its client_ID which correlates to a human approver ID. To help emulate the human approver experience, the Signing Agent connects to a dedicated websocket feed that prints out every new transaction that is pending approval. Additionally, the Signing Agent functionality can be extended beyond a "regular" API approver and can act on behalf of an exchange. This allows the exchange Signing Agent to perform additional tasks, such as approve requests to connect Qredo Wallets, perform sweep transactions and act as a "master" approver for dedicated Wallets.

Summary of API docs sections

Each summary briefly describes the steps of every subsection to multi-level chapters:

Get started summary

  1. Sign up using Qredo Web App and Qredo Signing App and then apply for Partner API access.
    See quickstart.
  2. With access granted, generate RSA keys for API call signatures, then generate your API key in the Qredo Web App, and finally add public signing key on the very same screen in Qredo Web App.
    See Generate keys.
  3. Start signing calls using the Partner API Signing Client.
    See Sign API calls.

Partner API quick start summary

  1. Create a company. You cannot do much with the API without a company.
    See Step 1. Create a company.
  2. Add a trusted party to your company. You cannot perform custody without at least one trusted party.
    See Step 2. Create your trusted network.
  3. Create a fund with Qredo Wallets. A fund is the only way to have Qredo Wallets. Custodial policies and also the approvers are defined at this stage.
    See Step 3. Create a fund.
  4. Deposit assets from L1 blockchains in one of fund's Qredo Wallets.
    See Step 4. Perform a deposit.
  5. Perform a transfer out of selected Qredo Wallet to another Qredo Wallet. The transfer undergoes custody in order to complete.
    See Step 5. Perform a transfer.
  6. Whitelist a L1 blockchain Wallet and withdraw to it assets out of the selected Qredo Wallet. The withdrawal undergoes custody in order to complete.
    See Step 6. Perform a withdrawal.

Exchange quick start summary

Exchange quick start is work in progress

Please note that the Exchange quick start section is still work in progress.

  1. Create a Core Client using the API.
  2. Set up branding: contact Qredo and register your Exchange Core Client id, plus your exchange name and logo, as well as user metadata.
  3. Supply a list with test accounts: Qredo users who will be able to visualize and use your exchange in the Qredo Web app.
  4. Connect your Exchange Core Client to a web socket and start listening for client activity.
  5. Access the Qredo Web app with a test end user account (from the list provided in step 3) in the Qredo Web app, set up a fund and Wallet to connect.
  6. On the Exchange Core Client, approve the Wallet connect request.
  7. From end user account in the Qredo Web app, confirm the Wallet is activated.
  8. Perform tests of available actions and websocket feed with the Exchange Core Client.

Atomic swaps summary

Atomic swaps is work in progress

Please note that the Atomic swaps section is still work in progress.

  1. As Maker, create an atomic swap quote using POST atomicswap/make.
  2. Have Maker's approvers approve the quote.
  3. As Maker, submit the quote to the Liquidity Hub using POST /liquidityhub.
  4. As a potential Taker, retrieve quotes on the Liquidity Hub using GET /liquidityhub or a websocket feed.
  5. As Taker, select a quote by tx_id to take it using POST /atomicswap/take/{tx_id}.
  6. Have Taker's approvers approve the quote.

Posting to liquidity hub is optional

You are not obliged to publish to liquidity hub. Instead, you may choose to offer your quote tx_id to a selected party using a secure channel of your preference. If you choose that, skip steps 3 and 4.

Core API entities

Assets

Assets can be queried without stating a Company_ID. It is a useful endpoint to query prior to performing a transaction.

GET https://api.qredo.network/api/v1/p/assets

EXAMPLE UNCOMPRESSED ASSETS REQUEST

curl -X GET "https://api.qredo.network/api/v1/p/assets" 
-H "accept: application/json" \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \

EXAMPLE ASSETS RESPONSE

{"assets":
[
  {"code":"BTC",
  "name":"Bitcoin",
  "unitCode":"BTC",
  "scale":100000000,
  "enabled":true,
  "testAsset":false
  },
  {"code":"BTC-TESTNET",
  "name":"Bitcoin Testnet",
  "unitCode":"BTC-TEST",
  "scale":100000000,
  "enabled":true,
  "testAsset":true
  },
  {"code":"ETH",
  "name":"Ethereum",
  "unitCode":"ETH",
  "scale":1000000000,
  "enabled":true,
  "testAsset":false
  },
  {"code":"ETH-TESTNET",
  "name":"Ethereum Testnet",
  "unitCode":"ETH-TEST",
  "scale":1000000000,
  "enabled":true,
  "testAsset":true
  }
]
}

Asset Object

Attribute Description
code String - Asset Code e.g. BTC-TESTNET
name String - Asset Name e.g. Bitcoin Testnet
unitCode String - Asset unit code e.g. BTC-TEST
scale Number - The scale expressing the asset units e.g. 100000000
enabled Boolean - TRUE or FALSE Whether the asset is supported by Qredo or not.
testAsset Boolean - TRUE or FALSE - Whether the asset is a test asset or not.

Fees

Fees can be queried without stating a Company_ID. It is a useful endpoint to query prior to performing a transaction. You can calculate the real-time fees for specific assets and transaction types.

POST https://api.qredo.network/api/v1/p/fees

Fees at a glance

  • 0.1 bps (or 0.001%) for transfers/atomic swaps
  • 0.1 bps (or 0.001%) for withdraws
  • NO charge on deposits.

Create Fee Request

EXAMPLE UNCOMPRESSED FEE REQUEST

curl -X POST "https://api.qredo.network/api/v1/p/fees" 
-H "accept: application/json" \
-H  "Content-Type: application/json"  \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \
-d "{
  "type":"transferOut",
  "asset":"BTC-TESTNET",
  "amount":200000
  }"

EXAMPLE COMPRESSED FEE REQUEST

curl -X POST "https://api.qredo.network/api/v1/p/fees" -H  "accept: application/json" -H  "X-API-KEY: <YOUR_API_KEY" -H  "Content-Type: application/json" -d "{\"type\":\"transferOut\",\"asset\":\"BTC-TESTNET\",\"amount\":200000}"

EXAMPLE FEE RESPONSE

{"netAmount":200000,"amountToSend":200200,"fees":200}

Provide details of your transaction to obtain real-time fees.

Parameters Description
type Transaction Type e.g. transferOut See Transaction Types
asset Asset Type e.g. BTC-TESTNET
amount The asset amount for the transaction e.g. 200000

Company

A Company represents a customer account created by a partner. Multiple companies can be created corresponding to multiple customer accounts. A company must exist before any transaction can take place.

Company Object

Attribute Description
name* String - This is a required field. The name allocated to the Company. e.g. Big Funds Inc.
city String - The town or city the company is located. e.g. Paris
country String - This is the ISO alpha-2 country code e.g. FR
domain String - This is the website domain for the company e.g. bigfund.com
ref String - This is your reference for the company.
company_id String - This is the unique Company ID.

Create Company

EXAMPLE UNCOMPRESSED REQUEST

curl -X POST "https://api.qredo.network/api/v1/p/company" 
-H  "accept: application/json" 
-H  "X-API-KEY: <YOUR_API_KEY" 
-H  "Content-Type: application/json" 
-d "{
  "name":"Big Funds Inc.",
  "city": "Paris",
  "country":"FR",
  "domain":"bigfund.com",
  "ref":"<YOUR_REFERENCE>"
  }"

EXAMPLE COMPRESSED REQUEST

curl -X POST "https://api.qredo.network/api/v1/p/company" -H  "accept: application/json" -H  "X-API-KEY: <YOUR_API_KEY" -H  "Content-Type: application/json" -d "{\"name\":\"Big Funds Inc.\",\"city\":\"Paris\",\"country\":\"FR\",\"domain\":\"bigfund.com\",\"ref\":\"YOUR_REFERENCE\"}"

This is the first step. To create a company, the minimum required parameter is name.

POST https://api.qredo.network/api/v1/p/company

Parameters Description
name Required. String - The name of the Company
ref String - This is your reference for the company.
city String - The town or city the company is located. e.g. Paris
country String - This is the ISO alpha-2 country code e.g. FR. See List of Country Codes.

Returns a Company Object with a unique Company ID.

Retrieve Company

EXAMPLE UNCOMPRESSED REQUEST

curl -X GET "https://api.qredo.network/api/v1/p/company/{COMPANYID}" 
-H "accept: application/json" \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \

EXAMPLE COMPRESSED REQUEST

curl -X GET "https://api.qredo.network/api/v1/p/company/<COMPANY_ID>" -H  "accept: application/json" -H  "X-API-KEY: <YOUR_API_KEY>"

Retrieve details about a Company from a Company_ID. Includes the information used to create the Company.

GET https://api.qredo.network/api/v1/p/company/{COMPANY_ID}

Parameters Description
company_id Required. String - The unique company identifier.

Returns the Company Object associated with the Company_ID.

Update Company

Updates the specified Company by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

PUT https://api.qredo.network/api/v1/p/company/{COMPANY_ID}

All Parameters are optional except for Company_ID.

Parameters Description
company_id Required. String - This is the unique Company ID.
name String - Company name
city String - Company town/city
country String - This is the ISO alpha-2 country code
domain String - This is the website domain for the company e.g. bigfund.com
ref String - This is your reference for the company.

Returns the Company_ID and Ref.

EXAMPLE UNCOMPRESSED REQUEST

curl -X PUT "https://api.qredo.network/api/v1/p/company/{COMPANY_ID}" 
-H "accept: application/json" \
-H  "Content-Type: application/json"  \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \
-d "{
  "name":"Big Funds",
  "city":"London",
  "country":"UK",
  "domain":"bigfunds.co.uk",
  "ref":"<YOUR_REFERENCE>"
  }"

EXAMPLE COMPRESSED REQUEST

curl -X PUT "https://api.qredo.network/api/v1/p/company/{COMPANY_ID}" -H  "accept: application/json" -H  "X-API-KEY: <YOUR_API_KEU>" -H  "Content-Type: application/json" -d "{\"name\":\"Big Funds\",\"city\":\"London\",\"country\":\"UK\",\"domain\":\"bigfunds.co.uk\",\"ref\":\"<YOUR_REFERENCE>\"}"

Search Company

GET https://api.qredo.network/api/v1/p/company/search

Search for a company by entering 3 letters in the query field.

Parameters Description
query String 3 letters

Returns the total_count for the number of matches along with details of each matching company.

EXAMPLE UNCOMPRESSED REQUEST

curl -X GET "https://api.qredo.network/api/v1/p/company/search?query=big" 
-H "accept: application/json" \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \

EXAMPLE COMPRESSED REQUEST

curl -X GET "https://api.qredo.network/api/v1/p/company/search?query=big" -H  "accept: application/json" -H  "X-API-KEY: <YOUR_API_KEY>"

EXAMPLE RESPONSE

{
  "total_count":4,
  "matches":[
    {
      "company_id":"<COMPANY_ID_RESULT_1>",
      "name":"Big Org",
      "domain":""
    },
    {
      "company_id":"COMPANY_ID_RESULT_2",
      "name":"Big Funds Inc.",
      "domain":"bigfund.com"
    },
    {
      "company_id":"COMPANY_ID_RESULT_3",
      "name":"Big Fund",
      "domain":""
    },
    {
      "company_id":"COMPANY_ID_RESULT_4",
      "name":"big Fund",
      "domain":""}
      ]
      }

Trusted Network

A Trusted Network is the collective term for all Trusted Parties - Users, Counterparties and Custodians.

A Trusted Network is associated with a specific Company by its Company_ID.

It is within this network that you can perform transactions and withdrawals whilst ensuring the implementation of secure, decentralized custody.

At least one User must be added as a Trusted Party to create a Trusted Network. The minimum required fields are address and type.

Add User

A User is an individual who is added to the Qredo Network. Once added, funds can be transferred to them using the API. A user must be added to the Trusted Network as a Trusted Party to act as a custodian.

To add a User to the Qredo Network, they must join by registering and creating an account via the Qredo website and selecting 'Join the Network'.

Add Trusted Party

A Trusted Party can be a Counterparty for a transaction and/or a Custodian. Use this call to make a request to add a user or entity as a Trusted Party. The user or entity is only added as a Trusted Party after they have approved the request.

Before you start

A User must already be part of the Qredo Network to be added as a Trusted Party. To join the Qredo Network all users must register and create an account via the Qredo Website and selecting 'Join the Network'.

POST https://api.qredo.network/api/v1/p/company/{company_id}/trustedparty

Parameters Description
company_id Required. String - This is the company_id returned when you created a Company.
address Required. String - This is the User's email address.
type Required. String - Specified as 'user'
name Optional. String - Name of Trusted Party

Returns a standard HTTP 200 OK Response to indicate the request has been made to add a Trusted Party. The request needs to be approved by the intended Trusted Party via the Qredo Signing app on their mobile device or via the the Core Client.

EXAMPLE ADD TRUSTED PARTY REQUEST

curl -X POST "https://api.qredo.network/api/v1/p/company/{company_id}/trustedparty" 
-H "accept: application/json" \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \ 
  -d "{
    "address": "[email protected]",
    "type": "user"
    }

EXAMPLE ADD TRUSTED PARTY RESPONSE

{"code":200,"msg":"OK"}

Retrieve a list of Trusted Parties

Retrieves all Trusted Parties associated with a Company. This endpoint can be used to confirm that a user or entity has accepted a request to be a Trusted Party. Upon successful addition of a Trusted Party a 'Trusted_Entity_ID' is returned.

GET https://api.qredo.network/api/v1/p/company/{company_id}/trustedparty

EXAMPLE TRUSTED PARTY LIST RESPONSE

  "company_id": "<COMPANY_ID>",
  "total_count": 0,
  "list": [
    {
      "company_id": "<COMPANY_ID>",
      "total_count": 1,
      "list": {
        "trusted_entity_id": "<TRUSTED_ENTITY_ID>",
        "name": "Rosa Parks",
        "type": "user",
        "address": "[email protected]",
        "internal": true,
        "created": "<TIMESTAMP>"
      }
    }
  ]
}

Delete a Trusted Party

Remove a Trusted Party from a company Trusted Network.

DELETE https://api.qredo.network/api/v1/p/company/{company_id}/trustedparty/{trustedparty_id}

EXAMPLE REMOVE TRUSTED PARTY

curl -X DELETE "https://api.qredo.network/api/v1/p/company/<COMPANY_ID>/trustedparty/<TRUSTED_ENTITY_ID>" 
-H "accept: application/json" \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \
Parameters Description
company_id Required. String - This is the company_id returned when you created a Company.
trusted_entity_id Required. String - This is returned by retrieving all Trusted Parties (above)

Returns standard HTTP 200 OK Response to indicate a Trusted Party has been removed successfully.

Core Client

A Core Client acts as an automated Custodian for transactions. A Core Client allows you to set up a websocket feed and listen to actions.

Core Client Object

Attributes Description
id Unique ID for the Core Client
name Core Client name
feed Unique Websocket Feed
timestamp Time in epoch

Create a Core Client

Create a Core Client to programmatically automate custodian flows.

POST https://api.qredo.network/api/v1/p/coreclient

Parameters Description
name Required. String

Returns a Core Client details object.

EXAMPLE CREATE A CORE CLIENT

curl -X POST "https://api.qredo.network/api/v1/p/coreclient" 
-H "accept: application/json" \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \
-d "{
  "name":"meaningful_name"
  }"

Retrieve a list of all Core Clients

View all registered Core Clients

GET https://api.qredo.network/api/v1/p/coreclient

Parameters Description
company_id Required. String - This is the company_id returned when you created a Company.

Returns a list of all Core Clients for a Company ID is returned.

EXAMPLE GET CORE CLIENTS RESPONSE

{"count":3,
"clients":[
  {
   "id":"<CORE_CLIENT_ID_1>",
   "name":"alpha",
   "feed":"wss://api.qredo.network/api/v1/p/coreclient/<CORE_CLIENT_ID_1>/feed",
   "timestamp":1607437910},
  {
   "id":"<CORE_CLIENT_ID_2>",
   "name":"beta",
   "feed":"wss://api.qredo.network/api/v1/p/coreclient/<CORE_CLIENT_ID_2/feed",
   "timestamp":1607444404},
  {
   "id":"<CORE_CLIENT_ID_3>",
   "name":"meaningful_name",
   "feed":"wss://api.qredo.network/api/v1/p/coreclient/CORE_CLIENT_ID_3/feed",
   "timestamp":1607945099
   }
   ]
   }

Core Client Websocket Feed

The websocket API offers real-time streaming event updates. All 'Actions' performed by the Core Clients are viewable and actionable.

Using your chosen programming environment, listen to the Core Client's websocket feed URL (returned in the previous step)

wss://api.qredo.network/api/v1/p/coreclient/<CORE_CLIENT_ID>/feed

Action Object

Attribute Description Child Attributes
id Action ID -
type Action Type ApproveWithdraw, ApproveTransfer, RejectWithdraw, RejectTransfer -
status The status of the action pending, expired, approved, rejected -
timestamp Time in epoch -
expireTime Time in epoch -
details Details of the Action ActionDetailApproveWithdraw, ActionDetailApproveTransfer txtype, txID, asset, amount, fees, net amount, reference, benefitOf, accountNo, companyID, fundID, initiatedtime, expires, recipientAddress, recipientAddressName, initiatedBy, initiatorName, initiatorType

Create a Websocket Connection

You must include the following headers:

"x-api-key": "your API key",
"x-sign": "the signature of the timestamp concatenated with the WSS URL",
"x-timestamp": "the timestamp used to generate the signature"

Example using Golang

Use our example Golang partnerapi-sign client program.

Required: Golang

Steps

1) Clone the Partner API Sign repo

2) Change directory to the location where the repo is installed on your laptop.

cd partnerapi-sign

3) Build the sample app

go build -o partnerapi-sign

4) Listen to the websocket with the following command:

Linux/Mac

./partnerapi-sign websocket -url wss://api.qredo.network/api/v1/p/coreclient/<CORE_CLIENT_ID>/feed

Windows

partnerapi-sign.exe websocket -url wss://api.qredo.network/api/v1/p/coreclient/<CORE_CLIENT_ID>/feed

5) The command displays your URL, hash, signature and timestamp. It then attempts to connect and if successful returns "connected". Any actions sent to your Core Client are displayed in compressed JSON format.

View Core Client Actions.

Example using Python3

Required: Python >= 3.6.1 Also, install the websocket library.

pip3 install websocket

Steps

1) Run the example Python script:

Note

You may have to switch the code tab to 'Python' in order to view it.

EXAMPLE PYTHON

from websocket import create_connection
ws = create_connection("wss://api.qredo.network/api/v1/p/coreclient/<CORE_CLIENT_ID>/feed", header={"x-api-key": "<YOUR_API_KEY>","x-sign": "<SIGNATURE>", "x-timestamp": "12345678"})
while True:
    result =  ws.recv()
    print (result)

2) You are successful when your CLI displays actions from the Core Client in compressed JSON format.

Example websocket response
  • id: Action ID
  • type: Action Type e.g. ApproveWithdraw, ApproveTransfer
  • status: The status of the action e.g. pending, expired, approved, rejected
  • timestamp: Time in epoch
  • expireTime: Time in epoch

EXAMPLE WEBSOCKET RESPONSE

{"id":", "<ACTION_ID>": ", "type": "<TYPE_OF_ACTION>", "status": ", "timestamp": , "expireTime": }

Retrieve details of all pending actions

Retrieve details of all pending actions associated with a Core Client.

GET /coreclient/{client_id}/actions

Parameters Description
client_id Required. String - This is the Core Client ID.

Returns a list of pending actions.

EXAMPLE PENDING ACTIONS RESPONSE

{
  "count": 0,
  "actions": [
    {
      "id": "<CORE_CLIENT_ID>",
      "type": "ApproveTransfer",
      "status": "pending",
      "timestamp": 1601972322,
      "expireTime": 1601973322
    }
  ]
}

Retrieve details of an action

Retrive details of a specific action associated with a Core Client

GET /coreclient/{client_id}/action/{action_id}

Parameter Description
action_ID The unique identifier for the Action.
client_ID The Core Client unique identifier.

Returns an Action object.

EXAMPLE ACTION OBJECT RESPONSE

{
  "id": "<ACTION_ID>",
  "type": "ApproveWithdraw",
  "status": "pending",
  "timestamp": 0,
  "expireTime": 0,
  "details": {
    "txType": "string",
    "txID": "string",
    "asset": "string",
    "amount": 0,
    "fees": 0,
    "netAmount": 0,
    "reference": "string",
    "benefitOf": "string",
    "accountNo": "string",
    "companyID": "string",
    "fundID": "string",
    "initiatedTime": 0,
    "expires": 0,
    "recipientAddress": "string",
    "recipientAddressName": "string",
    "initiatedBy": "string",
    "initiatorName": "string",
    "initiatorType": "string"
  }
}

Approve an action

Approve an action.

PUT /coreclient/{client_id}/action/{action_id}

Parameter Description
action_ID The unique identifier for the Action.
client_ID The Core Client unique identifier.

Returns an Action object with status "approved".

Reject an action

Rejects an action.

DELETE /coreclient/{client_id}/action/{action_id}

Parameter Description
action_ID The unique identifier for the Action.
client_ID The Core Client unique identifier.

Returns an Action object with status "rejected".

Holdings

A Holding represents a portfolio of Funds.

You can retrieve all assets held by a company according to the asset type. Each Holding entry includes the balance for that asset allowing you to track funds coming in and out.

Holdings Object

Attribute Description
total_count This is the number of asset types held by a company
symbol This is the symbol for the asset type e.g. BTC
amount The quantity of each asset

Retrieve Holdings

Use this endpoint to retrieve information on all assets held by a company on the Qredo Network.

GET https://api.qredo.network/api/v1/p/company/{company_id}/holding

Parameters Description
company_id* The unique identifier for the company

Returns the Holdings Object.

EXAMPLE RETRIEVE HOLDINGS RESPONSE

  "total_count": 3,
  "holdings": [
    {
      "code": "BTC",
      "amount": 4266
    },
    {
      "code": "ETH",
      "amount": 1077
    },
    {
      "code": "USDT",
      "amount": 500451
    }
  ]
}

Deposits

Deposits add assets to wallets contained within funds.

You can add a deposit to a wallet using the wallet_code or wallet_id.

Retrieve Fund Deposit Address

EXAMPLE FUND DEPOSIT ADDRESS RESPONSE

{
  "total_count": 0,
  "list": [
    {
      "asset": "BTC-TESTNET",
      "address": "n2GoFtw8aTH6y...fxrSp3iTL6jwUX",
      "balance": 100
    },
    {
      "asset": "ETH-TESTNET",
      "address": "y2koFtw8aTH6y...ljhrSp4trys456",
      "balance": 200
    }
  ]
}
Use this endpoint to retrieve fund deposit addresses for each asset in that fund.

GET https://api.qredo.network/api/v1/p/company/{company_id}/fund/{fund_id}/deposit

Parameters Description
company_id Required. The unique company identifier
fund_id Required. The unique fund identifier

Returns a list of fund assets, deposit addresses and current balances. See 'Example Fund Deposit Address Response'.

Note

Each asset has its own deposit address.

Deposit assets into a Fund

Use this endpoint to add an asset to an existing fund.

POST https://api.qredo.network/api/v1/p/company/{company_id}/fund/{fund_id}/deposit

Parameters Description
company_id Required. The unique company identifier
fund_id Required. The unique fund identifier

Returns a standard HTTP 200 OK Response indicates an asset has been added successfully.

Funds

A Fund represents a container for a portfolio of Assets and their associated Wallets. Multiple Funds can be created on behalf of a customer to form a Holding.

Administrators, Principals and Custody Groups are assigned to each individual fund. There is only one Custody Group per Fund.

Each Asset Type within a fund e.g. BTC can have multiple Wallets.

Wallets can be STANDARD, DEDICATED or MULTI-COUNTERPARTY. View WALLET TYPES.

Fund Object

EXAMPLE FUND OBJECT

{
"fund_id":"1o0vR41rNSRRkJDaDfnT9sKNdY6",
"name":"Fund 1",
"description":"Fund for demonstration",
"custodygroup_withdraw":"1o0vR7B7IcKUjAymQVOroGre7DF",
"custodygroup_tx":"1o0vR1QhIFnfsjzO0tPZPQZyPW8",
"members":
  [
    {
      "entity":
      {
        "id":"1nyEFWwuZp8g8eoI0qBrNjvjFb4",
        "accountCode":"4nZ94izhGvajYqbrRJtHEWwaZ2V785R5AJ13SCPPoDa8",
        "name":"Cryptomagic",
        "initials":"C",
        "type":"company",
        "company":
          {
            "name":"Cryptomagic"
          }
      },
        "permissions":
          {
            "admin":true
          }
            }
    ],
    "assets":["BTC-TESTNET"],
    "wallets":
    [
      {
        "wallet_id":"A8zpKjJ5VsKKm175EwASd7BKCQcwZ6QF5Mm8ozbAYb7H",
        "name":"New wallet",
        "asset":"BTC-TESTNET",
        "type":0,
        "status":"ready",
        "address":"muBYKnPgEgnMKBW1xySNDcQ8VScLLA2Meg",
        "address_type":"P2PKH",
        "short_code":"purchase version cousin",
        "balance":0,
        "custodygroup_withdraw":"1o0vR7B7IcKUjAymQVOroGre7DF",
        "custodygroup_tx":"1o0vR1QhIFnfsjzO0tPZPQZyPW8"
        }
    ]
  }
Attribute Description Child Attributes
fund_id The unique ID for the fund. Returned when fund is created. -
name This is the name allocated when fund created -
description This is a description of the fund -
custodygroup_withdraw The Fund Custody Policy specifying:
members (trusted_party_id) account code
threshold (number of signatures required) for authorization
-
custodygroup_tx The Fund Transfer Policy specifying:
members (trusted_party_id)
threshold (number of signatures required)
-
members Details about Fund members and permissions entity ID e.g. company ID
account code --
name e.g. company name
initials initials of entity name
type user - (firstName,lastName, email, userName), company - (company name), Core Client
permissions admin, withdraw, transfer or swap
wallets This defines the wallet type(s) name The name for a wallet e.g. BTC wallet
asset The asset associated with the wallet.
OPTIONAL custodygroup_withdraw Use to define a custom policy at wallet level
OPTIONAL custodygroup_tx Use to define a custom policy at wallet level
type
0 - Standard Wallet (For independent transactions)
1 - Dedicated Wallet (For use with a single 3rd Party)
3 - Multi-Counterparty Wallet (For use with several 3rd Parties)
connect External 3rd Party connection requires counterparty_id and client_id (provided by third party)
status

Create Fund

EXAMPLE CREATE FUND REQUEST

FUND WITH TWO WALLETS

1) Standard Wallet - Inherit Fund TX Policy, Custom Withdrawal Policy

2) Dedicated Wallet - One Counterparty e.g. Exchange

{
  "name": "Apollo",
  "description": "Fund with Dedicated & Standard Wallet - Inherit Fund TX Policy and Custom Withdrawal Policy",
  "custodygroup_withdraw": {
    "threshold": 1,
    "members": [
      "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
      "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
      "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
      "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
    ]
  },
  "custodygroup_tx": {
    "threshold": 1,
    "members": [
      "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
      "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
      "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
      "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
    ]
  },
  "wallets": [
    {
      "name": "Standard Wallet",
      "asset": "ETH",
      "custodygroup_withdraw": {
        "threshold": 2,
        "members": [
          "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
          "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt"
                   ]
                               }
    },
    {
      "name": "Dedicated Exchange Wallet",
      "asset": "BTC",
      "type": 1,
      "connect": [
        {
          "counterparty_id": "7RKJyd3zY8rXq5TV5V8mdv9HxD2d8fyJqpDNH3MHT2pK",
          "client_id": "A12345"
        }
                ]
    }
  ]
}

SUCCESSFUL 200 RESPONSE BODY

{
  "fund_id":"1qI5uyxVcda770hphSUBFF1bKBm",
  "custodygroup_withdraw":"1qI5usgVS5Qyz979tHk08vcpvN5",
  "custodygroup_tx":"1qI5uwpRl38SCdjMeBmnWVeX7g1"
}

FUND WITH STANDARD WALLET - INHERIT TX POLICY, CUSTOM WITHDRAWAL POLICY

{
    "name": "Apollo",
    "description": "Fund with Standard Wallet - Inherit Default Fund TX & Withdrawal Policies ",
    "custodygroup_withdraw": {
        "threshold": 1,
        "members": [
            "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
            "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
            "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
            "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
        ]
    },
    "custodygroup_tx": {
        "threshold": 1,
        "members": [
            "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
            "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
            "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
            "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
        ]
    },
    "wallets": [
    {
        "name": "Standard Wallet",
        "asset": "ETH",
        "custodygroup_withdraw": {
            "threshold": 1,
            "members": [
                "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
                "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt"
            ]
        }
    }
  ]
}

SUCCESSFUL 200 RESPONSE BODY

{"fund_id":"1qINjCo8EKlndiKfG9votdTExMg","custodygroup_withdraw":"1qINj934jj8q9UC3hXBYRNq1ynB","custodygroup_tx":"1qINj98kifIePXx9mcNb6rOrmNj"}

FUND WITH STANDARD WALLET - INHERIT DEFAULT FUND TX & WITHDRAWAL POLICY

{
    "name": "Apollo",
    "description": "Fund with Standard Wallet - Inherit both Default Fund TX & Withdrawal Policies ",
    "custodygroup_withdraw": {
        "threshold": 1,
        "members": [
            "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
            "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
            "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
            "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
        ]
    },
    "custodygroup_tx": {
        "threshold": 1,
        "members": [
            "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
            "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
            "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
            "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
        ]
    },
    "wallets": [{
            "name": "Standard Wallet",
            "asset": "ETH"
        }
    ]
}

SUCCESSFUL 200 RESPONSE BODY

{
"fund_id":"1qIHVBwDjk7uJYuugG63Uv2dQrW",
"custodygroup_withdraw":"1qIHV9eywEfG6wS9HJwALHpIcjG",
"custodygroup_tx":"1qIHV7fvN5bACv1RDZY0m1iGmCH"
}

FUND WITH TWO STANDARD WALLETS -

1) Standard Wallet containing BTC, Custom Withdraw Policy & Default TX Policy

2) Standard Wallet containing ETH, Custom Withdraw Policy and Custom TX Policy

{
    "name": "Apollo",
    "description": "Fund with Standard Wallet - Custom TX & Custom Withdrawal Policies",
    "custodygroup_withdraw": {
        "threshold": 1,
        "members": [
            "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
            "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
            "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
            "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
        ]
    },
    "custodygroup_tx": {
        "threshold": 1,
        "members": [
            "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
            "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
            "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
            "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
        ]
    },
    "wallets": [{
            "name": "Standard Wallet with BTC, Custom TX Policy & Default Withdrawal Policy",
            "asset": "BTC",
            "custodygroup_tx": {
                "threshold": 2,
                "members": [
                    "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
                    "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt"
                ]
            }
        },
        {
            "name": "Standard Wallet with ETH, Custom TX Policy & Custom Withdrawal Policy",
            "asset": "ETH",
            "custodygroup_withdraw": {
                "threshold": 3,
                "members": [
                    "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
                    "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
                    "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
                ]
            },
            "custodygroup_tx": {
                "threshold": 2,
                "members": [
                    "2vNbT1cXHoKaUDDtHxofpunmPibmAJ7mjTSMDchk2eoq",
                    "5R8jT2vvtsjgXy6W46AxeFURfuWDLYXKod2ZhvrmvNyt",
                    "6NsppL9QLYBarWWQiPH3XkfJ5URjSHrhYk5zT6yeEEnU",
                    "Hcp4SmwmgU3zBNhnRGUuknkt1wBbjsEYBb8m6vhnsgak"
                ]
            }
        }
    ]
}  

SUCCESSFUL 200 RESPONSE BODY

{
  "fund_id":"1qIf1UmWGQ4zg8AMe2t9Ay3dOVi",
  "custodygroup_withdraw":"1qIf1YGCeyVcel1Og6UJ1jsmYLn",
  "custodygroup_tx":"1qIf1Rq8PQAxxqsgcfp2Po9T87C"}

Use this endpoint to create a fund and specify what assets you want in it.

POST https://api.qredo.network/api/v1/p/company/{company_id}fund

Parameters Description
company_id Required. The unique company identifier
name Name for the Fund.
description Fund description
custodygroup_withdraw Fund Custody Policy (withdrawals) threshold (number of custodial signatures required), each custodial member(trusted_entity_ids)
custodygroup_tx Fund Custody Policy (transfers) threshold (number of custodial signatures required), each custodial member (trusted_entity_ids)
wallets name Wallet name,
asset Asset type e.g. BTC-Testnet,
custodygroup_withdraw

Retrieve Fund

EXAMPLE RETRIEVE FUND RESPONSE

{
  "fund_id": "1dnpG2K2A5hMOVjGFl1DrsbnvmS",
  "name": "Fund 1",
  "description": "Fund for demonstration purposes",
  "custodygroup_withdraw": "1nL7QOoLqPDq89dcdhue6LJaFUS",
  "custodygroup_tx": "1nL7QUCW15xaV0jggAv1mFSR9jp",
  "members": {
    "entity": {
      "id": "1nKlfvP0U2HtHPmWDUKWJ4HR0xp",
      "accountCode": "3Xjk46grBSLRL6mYxB1NeoAVhgwiEHvAoehhYYwZkAYU",
      "name": "ACME Corp",
      "initials": "A",
      "type": "company",
      "company": {
        "name": "ACME Corp"
      }
    },
    "permissions": {
      "admin": true
    }
  },
  "assets": [
    "BTC-TESTNET"
  ],
  "wallets": [
    {
      "wallet_id": "5Hb8J...WCZES",
      "name": "New wallet",
      "asset": "BTC-TESTNET",
      "type": 213312000,
      "status": "ready",
      "address": "mfXXBW8Tmzkd7bRKKsUmjucpLQLThv8eYX",
      "address_type": "P2PKH",
      "short_code": "buddy harsh stick",
      "balance": 0,
      "custodygroup_withdraw": "1nL7QOoLqPDq89dcdhue6LJaFUS",
      "custodygroup_tx": "1nL7QUCW15xaV0jggAv1mFSR9jp"
    },
    {
      "wallet_id": "7MkAB...S1xH6",
      "name": "New dedicated wallet",
      "asset": "BTC-TESTNET",
      "type": 1,
      "status": "ready",
      "address": "mndLfcZYSdN7uow8MJWCCffBaAQsrqW217",
      "address_type": "P2PKH",
      "short_code": "fatigue infant conduct",
      "balance": 1000000,
      "custodygroup_withdraw": "1nL7QOoLqPDq89dcdhue6LJaFUS",
      "custodygroup_tx": "1nL7QUCW15xaV0jggAv1mFSR9jp",
      "connected": {
        "counterparty_id": "6WM255GuS9ikHHDVdjZNXjrt3CzGg4HvXRbw94qmqjVm",
        "name": "Test Excahnge",
        "client_id": "A12345",
        "status": "connected"
      }
    }
  ]
}

Use this endpoint to retrieve information about a specific Fund including custody groups and members.

GET https://api.qredo.network/api/v1/p/company/{company_id}/fund/{fund_id}

Parameters Description
company_id Required. The unique company identifier
fund_id Required. The unique fund identifier

Returns details about a specific fund, custody groups for withdrawals and transfers as well as details on fund members and their permissions.

Search Funds

EXAMPLE FUND SEARCH RESPONSE

{
  "total_count": 2,
  "list": [
    {
      "name": "Big Fund",
      "id": "1dnpG2K2A......Fl1DrsbnvmS"
    },
    {
      "name": "Big Load",
      "id": "2cnp......VjGFl1DrsbnvmN"
    }
  ]
}

Use this endpoint to search all Company funds that match a query.

GET https://api.qredo.network/api/v1/p/company/{company_id}/fund/search

Parameters Description
company_id* Required. The unique company identifier
query String of 3 letters or more.

Returns all matching fund names and their corresponding fund_id are returned. See 'Example Fund Search Response'.

Wallets

Wallet Types

Granular Custody Policies are available at Wallet level. Multiple Asset Types can be added to a fund. Multiple wallets can be associated with individual Asset Types.

Parameter Wallet Type Description
0 Standard Wallet
1 Dedicated Wallet
3 Multi-Counterparty

Returns a fund id, custodygroup_withdraw policy ID, custodygroup_tx policy ID

EXAMPLE CREATE FUND RESPONSE

{
  "fund_id": "1dnfLZolYD72zasqtmtTXXoaNNJ",
  "custodygroup_withdraw": "1dnfLYHOGn8gScmInkMXSPzitj5",
  "custodygroup_tx": "1dnfLeHXkaxQPs2v5kvxglwKTKV"
}

Create Wallet

Use this endpoint to add a new wallet to a fund and specify what assets you want in it.

The default fund custody policy is used unless a wallet-level custody policy is specified.proto

POST https://api.qredo.network/api/v1/p/company/{company_id}fund/{fund_id}/wallet

Parameters Description
company_id Required. The unique company identifier
fund_id Required. The identifier for the fund.
name Name for the Fund.
description Fund description
custodygroup_withdraw Optional. Fund Custody Policy (withdrawals) threshold (number of custodial signatures required), each custodial member(trusted_entity_ids)
custodygroup_tx Optional. Fund Custody Policy (transfers) threshold (number of custodial signatures required), each custodial member (trusted_entity_ids)
wallets name Wallet name,
asset Asset type e.g. BTC-Testnet,
custodygroup_withdraw

EXAMPLE CREATE WALLET REQUEST

{
  "wallets": [
    {
      "name": "New wallet",
      "asset": "BTC-TESTNET"
    },
    {
      "name": "New wallet with custom custody group",
      "asset": "BTC-TESTNET",
      "custodygroup_withdraw": {
        "threshold": 1,
        "members": [
          "1dnfLZolYD72zasqtmtTXXoaNNJ",
          "1dnfLeHXkaxasdg4akvxglwKTKV"
        ]
      },
      "custodygroup_tx": {
        "threshold": 1,
        "members": [
          "1dnfLZolYD72zasqtmtTXXoaNNJ",
          "1dnfLeHXkaxasdg4akvxglwKTKV"
        ]
      }
    },
    {
      "name": "New dedicated wallet",
      "asset": "BTC-TESTNET",
      "type": 1,
      "connect": [
        {
          "counterparty_id": "6WM25...mqjVm",
          "client_id": "A12345"
        }
      ]
    }
  ]
}

Returns wallet IDs.

EXAMPLE CREATE WALLET RESPONSE

{
  "wallets": [
    "KGMWoEgmTZ9Voz9EAbtTHk7A2rhQra4aPcscYNLGePci",
    "9Voz9EAbtTHk7A2rhQgmTZYNLGePcira4aPcscKGMWoE"
  ]
}

Retrieve Wallet

EXAMPLE RETRIEVE WALLET REQUEST

Use this endpoint to retrieve information about a specific wallet including balance, addresses and custody groups.

GET https://api.qredo.network/api/v1/p/wallet/{wallet_id}

Parameters Description
wallet_id Required. The unique wallet identifier (returned when the wallet was created)
{
  "wallet_id": "string",
  "name": "string",
  "asset": "string",
  "type": 0,
  "status": "string",
  "address": "string",
  "address_type": "string",
  "short_code": "string",
  "balance": 0,
  "custodygroup_withdraw": "string",
  "custodygroup_tx": "string",
  "policy_withdraw": {
    "id": "string",
    "name": "string",
    "threshold": 0,
    "members": [
      {
        "id": "string",
        "name": "string",
        "accountCode": "string",
        "initials": "string",
        "type": "user",
        "company": {
          "name": "string"
        },
        "user": {
          "firstName": "string",
          "lastName": "string",
          "email": "string",
          "userName": "string"
        },
        "core-client": {
          "name": "string"
        }
      }
    ]
  },
  "policy_tx": {
    "id": "string",
    "name": "string",
    "threshold": 0,
    "members": [
      {
        "id": "string",
        "name": "string",
        "accountCode": "string",
        "initials": "string",
        "type": "user",
        "company": {
          "name": "string"
        },
        "user": {
          "firstName": "string",
          "lastName": "string",
          "email": "string",
          "userName": "string"
        },
        "core-client": {
          "name": "string"
        }
      }
    ]
  },
  "connected": [
    {
      "client_id": "string",
      "counterparty_id": "string",
      "name": "string",
      "status": "string"
    }
  ]
}

TRANSACTIONS

Transaction types can be deposit, withdraw, transferIn, transferOut, swap, swapIn, swapOut

Transfers

A Transfer object is created when you move assets from a fund to a counterparty fund on the Qredo Network. All transfers require Custodial Approval (in accordance with the fund transfer policy).

The Transfer object

Attributes Description Child Attributes
wallet_id Required. String - The originator wallet ID -
counterparty_wallet_address Required. String - This is the Counterparty Wallet Address NOTE: You can use the Counterparty Wallet code or their wallet_id -
reference String - This is your reference for your own records. -
benefit_of String - This is the name of the recipient of the transfer. -
account_no String - (Where relevant) This is the account number of the recipient of the transfer. -
expires Required. String - This is the time in epoch when the transfer expires without custodial approval. -
send* Required. This is the type and amount of asset sent. symbol - Required. String - Asset Symbol e.g. BTC
amount - Required. String - Amount of asset sent.

Create Transfer

EXAMPLE TRANSFER REQUEST

curl -X POST "https://api.qredo.network/api/v1/p/company/<COMPANY_ID/transfer" 
-H "Content-Type: application/json"
-H "accept: application/json" \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \
-d "
{
  "wallet_id": "HUnmE...gRKMk",
  "counterparty_wallet_address": "D1h4c...6QuSP",
  "expires": 1640998800,
  "benefit_of": "Malala Yousafzai",
  "account_no": "123-XX",
  "reference": "97879780",
  "send": {
    "symbol": "BTC",
    "amount": 800
  }
}"

Use this endpoint to create a transfer:

POST /company/{company_id}/transfer

Parameters Description
wallet_id* Required. The originator wallet_id
counterparty_wallet_address* Required. This is the wallet code OR counterparty wallet_id of the counterparty.
expiration* Required. This is the time in epoch when the transfer expires without custodial approval.
send symbol* Required. This is the symbol for the asset being transferred.
send amount* Required. This is the quantity of the asset being sent.
reference Optional
benefit_of Optional
account_no Optional

See 'Example Transfer Request'.

Returns a Transaction ID tx_id.

EXAMPLE TRANSFER RESPONSE

{
  "tx_id": "9827feec4e......a7c3b97add"
}

Addresses

Add Whitelist Address

Use this endpoint to whitelist an address. This is essential to ensure that a withdrawal transaction can be approved using this address.

GET https://api.qredo.network/api/v1/p/company/{company_id}/fund/{fund_id}/whitelist

Retrieve Fund Whitelist

Use this endpoint to get a list of all whitelisted addresses associated with a specific fund.

GET https://api.qredo.network/api/v1/p/company/{company_id}/fund/{fund_id}/whitelist

Parameters Description
company_id* Required. The unique company identifier
fund_id* Required. The unique fund identifier
address Optional. Find out whether a specific address has been whitelisted
asset Optional. Filter addresses for a specific asset

Returns all whitelisted addresses for that fund.

EXAMPLE FUND WHITELIST RESPONSE

{
  "total_count": 2,
  "list": [
    {
      "name": "Rosa_wallet",
      "asset": "BTC-TESTNET",
      "address": "bc1qg...ktq98"
    },
    {
      "name": "Alice_wallet",
      "asset": "BTC",
      "address": "tb1qd...x7ud8"
    }
  ]
}

Withdrawals

A Withdraw Object is created when you move assets from a fund to a withdrawal address. All withdrawals require Custodial Approval (in accordance with the fund withdrawal policy).

Withdraw Object

Attributes Description Child Attributes
wallet_id Required. String - The originator wallet
address Required. String - The destination address. This must be whitelisted.
expires Required. String - This is the time in epoch when the withdrawal expires without custodial approval. -
reference String - This is your reference for your own records. -
benefit_of String - This is the name of the recipient of the withdrawal. -
send* Required. This is the type and amount of asset sent. symbol - Required. String - Asset Symbol e.g. BTC
amount - Required. String - Amount of asset sent.

Create withdraw

EXAMPLE WITHDRAW REQUEST

curl -X POST "https://api.qredo.network/api/v1/p/company/<COMPANY_ID>/withdraw" 
-H "accept: application/json" \
-H  "Content-Type: application/json"  \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \
-d "
"wallet_id":"<ORIGINATOR_WALLET_ID>",
"address":"mkLaDxYkiaYW...TNu9ZcpHgd6",
"expires":16****800,
"benefit_of":"Bob Cohen",
"account_no":"123-XX",
"reference":"CX15R99XX",
"send":{
  "symbol":"BTC",
  "amount":800}
  }"

Use this endpoint to create a withdrawal:

POST /company/{company_id}/withdraw

Parameters Description
company_id* Required. The unique company identifier
wallet_id* Required. The originator fund identifier
address* Required. The destination address
expires* Required. This is the time in epoch when the transfer expires without custodial approval.
send symbol* Required. This is the symbol for the asset being transferred.
send amount* Required. This is the quantity of the asset being sent.
reference Optional
benefit_of Optional
account_no Optional

See 'Example withdraw request'

Response

EXAMPLE WITHDRAW RESPONSE

{
  "tx_id": "45677feec4e......a7c3b97add"
}

The Response is a Transaction ID tx_id.

Atomic Swaps

Atomic Swaps enable you to exchange assets with another member on the Qredo Network in a decentralized way with granular governance as defined by you.

Note

The member you want to trade with must have a fund containing both assets you want to swap with (e.g. ETH-TESTNET & BTC-TESTNET)

  1. A Maker posts their quote.
  2. The quote is authorized by the Maker's Custodians.
  3. The quote is added to the Liquidity Hub if add_to_liquidity_hub is set to 'True'
  4. A potential Taker views quotes on the Liquidity Hub
  5. A Taker uses the swap transaction_id to take the quote.
  6. The quote is authorized by the Taker's Custodians
  7. The Atomic swap completes in a single transaction.

Create Atomic Swap (Maker)

EXAMPLE ATOMIC SWAP MAKE REQUEST

curl -X POST "https://api.qredo.network/api/v1/p/company/<MAKER_COMPANY_ID>/atomicswap/make" 
-H "accept: application/json" \
-H  "Content-Type: application/json"  \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \
-d "
{
  "send_wallet_id": "nLQtaZgx49s2sa7dD1K8unLQtaZgx49s",
  "receive_wallet_id": "2sa7dD1K8unLQtaZgx49snLQtaZgx49s",
  "expires": 1640998800,
  "reference": "CX15R99XX",
  "send": {
    "symbol": "BTC",
    "amount": 800
  },
  "receive": {
    "symbol": "ETH",
    "amount": 2536
  },
  "add_to_liquidity_hub": false
}

EXAMPLE ATOMIC SWAP MAKE RESPONSE

{
  "tx_id": "bda3daa7c3...eec4eae4e80",
  "tx_url": "https://qredo.network/aswp<tx_id>"
}
Prerequisites:

  1. Select a fund with required assets and quantities to swap with. (fund_id)

  2. Make your quote. Specify the the assets and quantities you want to send and receive.

  3. Set an expiry time for the swap.

  4. Use this endpoint to make a quote and initiate an Atomic Swap.

POST https://api.qredo.network/api/v1/p/company/{company_id}/atomicswap/make

Parameters Description
send_wallet_id* Required. The Maker's wallet ID
receive_wallet_id* Required. The Taker's wallet ID
expires* Required.
reference Optional. Your reference for the swap
send* Required. Your 'Sell' price - Asset Symbol and Amount
receive* Required. Your 'Buy' price - Asset Symbol and Amount
add_to_liquidity_hub Optional. True or False. If True, quote is automatically added to Liquidity Hub

See 'Example Atomic Swap Make Request'

Note

The Atomic Swap Make Request must be authorized in accordance with the Maker's custodial policy.

Returns a unique Swap Transaction ID tx_id and Transaction URL tx_url.

Warning

This must be passed to the Taker and executed prior to the expiry time.

Note

The tx_url can be sent to a 'real' user for them to take.

View Atomic Swap Details

View Status of Make

Use the following endpoint to view transaction details of a Make swap.

GET https://api.qredo.network/api/v1/p/company/{company_id}/atomicswap/make/{tx_id}

Parameters Description
company_id Required. Makers unique company identifier
tx_id Required. The Maker swap transaction_id

Returns the Transaction Object. See 'Example Transaction Object'

Delete Atomic Swap (Maker)

Use this endpoint to cancel an Atomic Swap you have created. This removes it from the Liquidity Hub.

DELETE https://api.qredo.network/api/v1/p/company/{company_id}/atomicswap/make/{tx_id}

Complete Atomic Swap (Taker)

EXAMPLE ATOMIC SWAP TAKE REQUEST

curl -X POST "https://api.qredo.network/api/v1/p/company/{company_id}/atomicswap/take" 
-H "accept: application/json" \
-H  "Content-Type: application/json"  \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \
-d "
{
  "swap_id": "1l65SpjcfhSEgjObPPHU7vwTNzb",
  "send_wallet_id": "1l62uLH2KKuXpb4hNIgp7DLWGRN",
  "receive_wallet_id": "2sa7dD1K8unLQtaZgx49snLQtaZgx49s",
  "reference": "CX15R99XX"
}
  1. Use the Swap transaction_id from the Maker to perform the Swap.

  2. View Atomic Swap Status to ensure it has been authorized

  3. Select a fund with the required assets and quantities to receive and send.

  4. Use this endpoint to take the quote before it expires.

Note

The Atomic Swap Take Request must be authorized in accordance with the Taker's Custodial Policy.

Parameters Description
swap_id* Required. The tx_id (obtained from the Maker)
send_wallet_id* Required. The Taker's wallet ID or wallet code
receive_wallet_id* Required. The Maker's wallet ID or wallet code
reference* Reference for the swap

See 'Example Atomic Swap Take Request'

Returns a unique Swap Transaction ID tx_id.

View Transaction Status using the tx_id

View Holdings to confirm the Swap has executed.

Note

The tx_url can be sent to a 'real' user for them to take.

View Atomic Swap Status(Take)

Use the following endpoint to view transaction details of a Take swap.

GET https://api.qredo.network/api/v1/p/company/{company_id}/atomicswap/take/{tx_id}

Parameters Description
company_id Required. Takers unique company identifier
tx_id Required. The Taker swap transaction_id

Returns the Transaction Object. See 'Example Transaction Object'.

Liquidity Hub

The Liquidity Hub is a place for makers to broadcast Atomic Swap quotes. It is also the place for potential takers to retrieve information about all available Atomic Swap quotes.

Add Atomic Swap

EXAMPLE ATOMIC SWAP REQUEST

```curl
curl -X POST "https://api.qredo.network/api/v1/p/company/{company_id}/liquidityhub" 
-H "accept: application/json" \
-H  "Content-Type: application/json"  \
-H "x-timestamp: <Epoch timestamp>" \
-H "x-sign: <signature generated_using your RSA key>" \
-H "X-API-KEY: <API key created in Qredo web app>" \
-d "
{
  "tx_id": "1lm519eiGT......HrEYvSBuSn"
}
Use this endpoint to add your swap to the Liquidity Hub.

POST https://api.qredo.network/api/v1/p/company/{company_id}/liquidityhub

Parameters Description
company_id Required. The Maker's unique company identifier
tx_id Required. The Transaction Id received after creating the swap.

Returns a standard HTTP 200 OK Response to indicate a swap_transaction_id has been added successfully.

Note

The tx_id is not posted in the Liquidity Hub unless it has custodial approval.

Retrieve all Active Swaps

Use this endpoint to retrieve all active swaps in the Liquidity Hub.

GET https://api.qredo.network/api/v1/p/company/{company_id}/liquidityhub

Returns a list of active swaps. (Owner indicates whether the swap is associated with company_id queried).

EXAMPLE GET RESPONSE LIQUIDITY HUB

{"items":
[
  {
    "tx_id":"ioaco989089jkYn", 
    "send_amount": 800,
    "send_asset": "ETH",
    "receive_amount": "BTC",
    "receive_asset": "ETH",
    "owner": false,
    "expires": 189896876,
    "added":198787878
  }
]
}

Liquidity Hub Websocket Feed

Use this endpoint to get a real-time feed of all active swaps in the Liquidity Hub.

wss://api.qredo.network/api/v1/p/liquidityhub/feed

Fund Ledger

View all transactions for a Fund.

View Fund Ledger

EXAMPLE LEDGER OBJECT

{
  "List": [
    {
      "TxID": "1kEe4G9mopRzQk3HKnnebfCj5Dh",
      "chainTxID": "8frWYAHJL6wvpY7ioT35sKZ5kyqaSt6kLdTaSShZ11Gb",
      "fundID": "1kEYnRGrYmuhNLFvVhwiiqj6XcM",
      "timestamp": 1605269988,
      "expireTime": 1640998800,
      "status": "approved",
      "type": "transferOut",
      "asset": "BTC-TESTNET",
      "amount": 2803,
      "fees": 3,
      "netAmount": 2800,
      "counterpartyID": "1kEY6PBbhiseE7RfifsMCDusXL8",
      "counterpartyName": "ACME Corp",
      "address": "",
      "reference": "CX15R99XX",
      "benefitOf": "John Smith",
      "accountNo": "123-XX"
    },
    {
      "TxID": "",
      "chainTxID": "EX79B14iusvPjnBaZzaEunxQppdBayGW7KEd2Y8hWtQ8",
      "fundID": "1kEYnRGrYmuhNLFvVhwiiqj6XcM",
      "timestamp": 1605267445,
      "expireTime": 0,
      "status": "",
      "type": "deposit",
      "asset": "BTC-TESTNET",
      "amount": 10000,
      "fees": 0,
      "netAmount": 10000,
      "counterpartyID": "",
      "counterpartyName": "",
      "address": "mjyWz5ZAXAeG9FFbigDyt3WqebrGohuemk",
      "reference": "",
      "benefitOf": "",
      "accountNo": ""
    }
  ]
}

Use the following endpoint to view all transations for a company fund.

GET https://api.qredo.network/api/v1/p/company/{company_id}/fund/{fund_id}/ledger

Parameters Description
company_id Required. company identifier
fund_id Required. transaction_id (returned when the Fund was created)
asset Asset type
wallet_id Wallet Code
direction Transaction direction
all
in
out

Returns the Ledger Object. See 'Example Ledger Object'.

Transaction Status

View Transfer status

EXAMPLE TRANSACTION OBJECT

{
  "approvedCount": 1,
  "expires": 1640998800,
  "initiatedTimestamp": 1594281300,
  "initiatorAuthorized": true,
  "initiatorName": "Big Fund",
  "reference": "CX15R99XX",
  "status": [
    {
      "actionID": "1eRPBxd9w6WrooxkquWmirbo4oL",
      "firstName": "Alice",
      "lastName": "Walker",
      "status": "approved",
      "timestamp": 1594281312,
      "userID": "<TRUSTED_ENTITY_ID>",
      "username": "awalker"
    }
  ],
  "statusDetails": {
    "accountNo": "123-XX",
    "amount": 801,
    "asset": "BTC-TESTNET",
    "benefitOf": "Bob Stander",
    "expires": 0,
    "fees": 1,
    "fundID": "<FUND_ID>",
    "netAmount": 800,
    "recipientAddress": "",
    "recipientEmail": "[email protected]",
    "recipientFirstName": "Bob",
    "recipientLastName": "Stander",
    "recipientUsername": "bstander",
    "reference": "CX15R99XX",
    "requestedBy": "Big Fund"
  },
  "thresholdRequired": 1,
  "txID": "1eRPC44Mjh...jYio5ulu",
  "txStatus": "approved"
}

Use the following endpoint to view the status of a specific transfer for a company.

GET https://api.qredo.network/api/v1/p/company/{company_id}/transfer/{tx_id}

Parameters Description
company_id Required. company identifier
tx_id Required. transaction_id (returned when the Transfer was created)

Returns the Transaction Object. See 'Example Transaction Object'.

Transfer Status Codes

tx status Description
pending_initiate_transfer String - The trade initiator is yet to authorise the transfer
initiate_rejected_transfer String- The transfer has been rejected by the trade initiator.
pending_transfer String - The transfer is yet to be approved by the custodians
expired_transfer String - The time set for custodian approval has been exceeded. The time is set in Epoch.
approved_transfer String - The transfer has been approved and has exceeded the threshold. The transfer is written to the Qredo Blockchain.
custody_rejected_transfer String - The transfer has been rejected by the custodians.
chain_rejected_transfer String - Transfer has been rejected by the Qredo blockchain. (Contact Support)

View Withdraw status

Use the following endpoint to view the status of a specific withdraw for a company.

GET https://api.qredo.network/api/v1/p/company/{company_id}/withdraw/{tx_id}

Parameters Description
company_id Required. company identifier
tx_id Required. transaction_id (returned when the Withdraw was created)

Returns the Transaction Object. See 'Example Transaction Object'

{
  "approvedCount": 1,
  "expires": 1640998800,
  "initiatedTimestamp": 1594281300,
  "initiatorAuthorized": true,
  "initiatorName": "SW Corp",
  "reference": "CX15R99XX",
  "status": [
    {
      "actionID": "1eRPBxd9w6WrooxkquWmirbo4oL",
      "firstName": "Han",
      "lastName": "Solo",
      "status": "approved",
      "timestamp": 1594281312,
      "userID": "3fyHm7e3hsbSXBs1yjpzMaesirXPhqcz8kM7zgafmZef",
      "username": "hsolo"
    }
  ],
  "statusDetails": {
    "accountNo": "123-XX",
    "amount": 801,
    "asset": "BTC-TESTNET",
    "benefitOf": "Ben Kenobi",
    "expires": 0,
    "fees": 1,
    "fundID": "1ePK2dtLnpocC9uRuy3DlNC7zXd",
    "netAmount": 800,
    "recipientAddress": "",
    "recipientEmail": "[email protected]",
    "recipientFirstName": "Han",
    "recipientLastName": "Solo",
    "recipientUsername": "hsolo",
    "reference": "CX15R99XX",
    "requestedBy": "SW Corp"
  },
  "thresholdRequired": 1,
  "txID": "1eRPC44MjhRI3sJ6UzzjYio5ulu",
  "txStatus": "approved"
}

Withdrawal Status Codes

Withdrawal Status Codes

tx status description
pending_initiate_withdrawal String - The trade initiator is yet to authorise the withdrawal.
initiate_rejected_withdrawal String - The withdrawal has been rejected by the trade initiator.
pending_withdrawal String - The withdrawal is yet to be approved by the custodians.
expired_withdrawal String - The time set for custodian approval has been exceeded. The time is set in Epoch.
approved_withdrawal String - The withdrawal has been approved and has exceeded the threshold. The withdrawal is written to the Qredo Blockchain.
custody_rejected_withdrawal String - The withdrawal has been rejected by the custodians.
chain_rejected_withdrawal String - Withdrawal has been rejected by the Qredo blockchain. (Contact Support)

Core Client Actions

Action Type Description
ApproveWithdraw A withdraw has been approved.
ApproveTransfer A transfer has been approved.
Action Status Description
pending The action has not yet initiated
expired The action has expired
approved The action has been approved
rejected The action has been rejected.

THIRD PARTY CONNECTIONS

Exchanges

Dedicated and Multi-Counterparty wallets can be used to connect with third party exchanges.

Retrieve list of exchanges

Use the following endpoint to retrieve a list of exchanges to connect with.

GET https://api.qredo.network/api/v1/p/exchanges

Returns a list of Exchanges and their details.

EXAMPLE EXCHANGE LIST RESPONSE

{
  "exchanges":
  [
    {
    "id":"7RKJyd3zY8rXq5TV5V8mdv9HxD2d8fyJqpDNH3MHT2pK",
    "name":"Test Exchange",
    "url":"testexchange.co",
    "logourl":"https://www.logo.svg",
    "client":
      {
        "fields":
        [
          {
            "id":"customer_id",
            "type":"string",
            "name":"Your customer ID"
          },
          {
            "id":"customer_email",
            "type":"string",
            "name":"Your Email address"
          }
        ]
      }
    }

See examples of how to Connect a Dedicated Wallet to an Exchange

Sweeps

Sweeps are the ability for specified users to transfer into or withdraw funds from a Dedicated or Multi-Counterparty wallet without further authorisation. Specified users are 3rd parties such as Exchanges.

Add new Sweep

EXAMPLE SWEEP REQUEST

{
  "wallet_id": "HUnmEJEgYeNYj2pTH8DfikDcH5gjHqhj9iadgVQgRKMk",
  "recipient_wallet_id": "HUnmEJEgYeNYj2pTH8DfikDcH5gjHqhj9iadgVQgRKMk",
  "expires": 1640998800,
  "reference": "CX15R99XX",
  "send": {
    "symbol": "BTC",
    "amount": 800
  }
}

Initiate a new sweep transaction and define parameters for the transaction.

Use the following endpoint to create a new sweep.

POST https://api.qredo.network/api/v1/p/coreclient/{client_id}/sweep

Parameters Description
client_id Required. This is the client ID as used by a 3rd party e.g. exchange
wallet_id String. This is the originator wallet ID
recipient_wallet_id String This is the destination wallet ID
reference Reference for the transaction
expires Expiration time for transaction if not approved by custodians.
send Required symbol Asset symbol e.g. BTC
amount quantity of assets being sent

Returns a transaction ID is returned.

EXAMPLE SWEEP REQUEST RESPONSE

{
  "tx_id": "9827feec4eae4e80bda3daa7c3b97add"
}

View Sweep Status

EXAMPLE VIEW SWEEP STATUS RESPONSE

{
  "approver_count": 0,
  "expires": 0,
  "initiated_timestamp": 0,
  "reference": "string",
  "status": [
    {
      "action_id": "string",
      "status": "string",
      "timestamp": 0,
      "entity": "string"
    }
  ],
  "status_details": {
    "amount": 0,
    "asset": "string",
    "expires": 0,
    "fees": 0,
    "wallet_id": "string",
    "net_amount": 0,
    "recipient_wallet_id": "string",
    "reference": "string",
    "requested_by": "string"
  },
  "threshold_required": 0,
  "tx_id": "string",
  "tx_status": "string"
}

View the status of a Sweep by providing the client_ID and tx_id.

Use the following endpoint to create a new sweep.

POST https://api.qredo.network/api/v1/p/coreclient/{client_id}/sweep/tx_id

Parameters Description
client_id Required. This is the client ID as used by a 3rd party e.g. exchange
tx_id Required. This is the tx_id returned when the sweep request was made

Returns the Sweep Transaction object.


Last update: 2022-12-14