Qredo Partner & Core Client API
View the Open API spec
OVERVIEW
Introduction
Qredo Partner & Core Client APIs enable you to manage funds and perform transactions whilst ensuring robust decentralized custody for your clients.
To gain access to the Partner & Core Client API, create an account by joining the network and applying from the Qredo Web App. Once you’ve completed the signup process and acknowledged our terms, we’ll review your application and if you're accepted you'll be able to generate API keys via the Qredo Web App.
You can use the Partner & Core Client API in test mode without affecting your live data or interacting with networks. The API key you use determines whether the request is live mode or sandbox test mode.
Environments
There is a single Production environment with two sets of keys.
You can generate keys for live (Production) and testing (Sandbox) API Keys via the Web App.
Base URL
BASE URL
https://api.qredo.network/api/v1/p
The Base url is the same for both testing and live requests but the API keys for authentication are different.
https://api.qredo.network/api/v1/p
Request, response format
Our APIs are organized around RESTful principles with resource-oriented URLs. They return compressed JSON encoded responses and use standard HTTP response codes to indicate status and errors. Requests must be submitted in a compressed format.
Authentication
EXAMPLE HEADER
Use a timestamp OR a nonce
-H "accept: application/json" \
-H "x-timestamp: <ENTER_TIMESTAMP>" \
-H "x-nonce: <ENTER_NONCE>" \
-H "x-sign: <YOUR_GENERATED_SIGNATURE>" \
-H "X-API-KEY: <YOUR_API_KEY>" \
The Partner & Core Client API is served over HTTPS TLS v1.2+ to ensure data privacy; HTTP and HTTPS with TLS versions below 1.2 are not supported. All requests must include a Content-Type of application/json and the body must be valid JSON.
Every request to the Qredo Partner API & Core Client API requires:
- YOUR_API_KEY - the Base64 encoded key (copied to clipboard from the Qredo Web App). This can be either the sandbox key or production key.
SIGNATURE AND TIMESTAMP (or NONCE) - The signature is the URL-safe base64 encoding (RFC 4648) of the RSA PKCS #1 1.5 signature of the SHA256 hash of the payload to be signed.
PAYLOAD The payload to be signed is the nonce or timestamp concatenated with the URL of the request then the body in compressed JSON format (if that particular call requires a body)
In summary:
- Construct the JSON body
- Compress the JSON
- Concatenate it on to the end of the nonce/timestamp and URL
- Hash it with the SHA256 algorithm
- Sign the hash with RSA PKCS #1 1.5
- Encode the signature with URL-safe base64 encoding
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Test the API
The type of API you use determines whether you use the sandbox or live environment.
You can make all the same API requests in the sandbox API as in the live one. Sandbox results have the same result response structures as live requests.
You can use the sandbox API to simulate API requests and to check:
- Your system's network connectivity with the Partner & Core Client API.
- Your websockets are working correctly.
- You are posting requests in the correct format.
- You are handling responses correctly.
You can generate a sandbox API key from the Qredo Web App -> Partner Settings.
Go live
Once you have completed Sandbox testing you can generate live Production API keys from the Qredo Web App -> Partner Settings.
Error Messages
ERROR STRUCTURE
{
"code": "<ERROR_CODE>",
"msg": "<ERROR_MESSAGE>",
"detail": {
"reason": "<NOT_ALWAYS_PRESENT>"
}
}
EXAMPLE ERROR MESSAGE
{
"code": 401,
"msg": "Unauthorized",
"detail": {
"reason": "empty token"
}
}
Qredo uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx
range indicate success. Codes in the 4xx
range indicate an error that failed given the information provided (e.g. a required parameter was omitted). Codes in the 5xx
range indicate an error with Qredo servers (rare).
Some 4xx
errors include an error code explaining the error reported.
All errors are returned with the same structure:
Error Code | Meaning |
---|---|
400 | Bad Request -- The request was not accepted typically due to invalid syntax. Make sure your request is formatted correctly. |
401 | Unauthorized -- The request does not have permission to perform the request. Make sure you've entered a correct API Key for authentication. |
403 | Forbidden -- The API key does not have permission to perform the request. Is your account set up? Contact Support |
404 | Not Found -- The requested resource does not exist. Make sure you've formatted the URL correctly. |
429 | Too Many Requests -- Too many requests hit the API too quickly. Please try again later. |
50x | Internal Server Error -- Something went wrong on Qredo's end (rare). Please try again later. |
Rate Limits
tbc
Versioning
A publicly released version of a Partner & Core Client API will never change in any way that could impact clients' integrations.
Whenever Qredo makes any API change, a new version of an API will be released that clients can choose to upgrade their integration to.
Changelog
tbc
CORE RESOURCES
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.net/api/v1/p/assets
EXAMPLE UNCOMPRESSED ASSETS REQUEST
curl -X GET "https://api.qredo.net/api/v1/p/assets"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
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
}
]
}
Currently, (December 2020) Qredo supports the following assets:
- Bitcoin,
- Bitcoin Testnet,
- Ethereum,
- Ethereum Testnet.
Bitcoin (BTC) is expressed to a scale of 100000000. This is equal to Bitcoin Satoshis. Ether (ETH) is expressed to a scale of 100000000. This is equal to Ether Gwei
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.net/api/v1/p/fees
Create Fee Request
EXAMPLE UNCOMPRESSED FEE REQUEST
curl -X POST "https://api.qredo.net/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 COMPRESSED FEE REQUEST
curl -X POST "https://api.qredo.net/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.net/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://qa-api.qredo.net/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.net/api/v1/p/company
Parameters
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 List of Country Codes |
Returns
Returns a Company Object with a unique Company ID.
Retrieve Company
EXAMPLE UNCOMPRESSED REQUEST
curl -X GET "https://api.qredo.net/api/v1/p/company/{COMPANYID}"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
EXAMPLE COMPRESSED REQUEST
curl -X GET "https://api.qredo.net/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.net/api/v1/p/company/{COMPANY_ID}
Parameters | Description |
---|---|
company_id | Required. String - The unique company identifier. |
Returns
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.net/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
Returns the Company_ID and Ref.
EXAMPLE UNCOMPRESSED REQUEST
curl -X PUT "https://api.qredo.net/api/v1/p/company/{COMPANY_ID}"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
-H "Content-Type: application/json"
-d "{
"name":"Big Funds",
"city":"London",
"country":"UK",
"domain":"bigfunds.co.uk",
"ref":"<YOUR_REFERENCE>"
}"
EXAMPLE COMPRESSED REQUEST
curl -X PUT "https://api.qredo.net/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.net/api/v1/p/company/search
Search for a company by entering 3 letters in the query field.
Parameters | Description |
---|---|
query | String 3 letters |
Returns
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.net/api/v1/p/company/search?query=big"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
EXAMPLE COMPRESSED REQUEST
curl -X GET "https://api.qredo.net/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.
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 indicates 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-API-KEY: <YOUR_API_KEY>"
-H "Content-Type: application/json"
-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://qa-api.qredo.net/api/v1/p/company/<COMPANY_ID>/trustedparty/<TRUSTED_ENTITY_ID>"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
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) |
Response
A standard HTTP 200 OK Response indicates 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 Object is returned.
EXAMPLE CREATE A CORE CLIENT
curl -X POST "https://api.qredo.net/api/v1/p/coreclient"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
-H "Content-Type: application/json"
-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.net/api/v1/p/coreclient/<CORE_CLIENT_ID_1>/feed",
"timestamp":1607437910},
{
"id":"<CORE_CLIENT_ID_2>",
"name":"beta",
"feed":"wss://api.qredo.net/api/v1/p/coreclient/<CORE_CLIENT_ID_2/feed",
"timestamp":1607444404},
{
"id":"<CORE_CLIENT_ID_3>",
"name":"meaningful_name",
"feed":"wss://api.qredo.net/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 partner-api-sign client program.
Requirements
- Golang
STEPS
1) Clone the Partner API Sign repo
2) Change directory to the location where the repo is installed on your laptop.
cd partner-api-sign
3) Build the sample app
go build -o partner-api-sign
4) Listen to the websocket with the following command:
Linux/Mac
./partner-api-sign websocket -url wss://api.qredo.network/api/v1/p/coreclient/<CORE_CLIENT_ID>/feed
Windows
partner-api-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.
Example using Python3
Requirements
Python >= 3.6.1
Prerequisites
Install the websocket
library.
pip3 install websocket
STEPS
1) Run the example Python script:
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
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
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
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
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
Returns the Holdings Object.
EXAMPLE RETRIEVE HOLDINGS RESPONSE
"total_count": 3,
"holdings": [
{
"code": "BTC",
"amount": 4266
},
{
"code": "ETH",
"amount": 1077
},
{
"code": "USDT",
"amount": 500451
}
]
}
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.
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 | To conduct transactions independently. |
1 | Dedicated Wallet | Solely for access by a single third party such as an Exchange. The third party is a Custodian over the wallet and must approve assets moving out of it. This is required because the trader may for example have a limit order open with a third party so they must ensure funds are available to meet the limit order. The connected third party also has the right to 'sweep' assets out of the wallet without further approval from the wallet's owners or custodians. |
3 | Multi-Counterparty | Accessible by multiple third parties. The purpose of this Wallet is to enable a trader to have multiple exchanges connected to the same Wallet for example to allow market orders to be placed on multiple exchanges. The connected third party/parties also have the right to 'sweep' assets out of the wallet without further approval from the wallet's owners or custodians. |
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
{
"name": "Fund 1",
"description": "Fund for demonstration purposes",
"custodygroup_withdraw": {
"threshold": 3,
"members": [
"1dnfLZolYD72zasqtmtTXXoaNNJ",
"1dnfLeHXkaxasdg4akvxglwKTKV",
"1dnfLsfgsaxQPs2v5kvxglwKTKV",
"1dnfLeHXkaxQPs2v5kvxglwKTKV"
]
},
"custodygroup_tx": {
"threshold": 3,
"members": [
"1dnfLZolYD72zasqtmtTXXoaNNJ",
"1dnfLeHXkaxasdg4akvxglwKTKV",
"1dnfLsfgsaxQPs2v5kvxglwKTKV",
"1dnfLeHXkaxQPs2v5kvxglwKTKV"
]
},
"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": "6WM255GuS9ikHHDVdjZNXjrt3CzGg4HvXRbw94qmqjVm",
"client_id": "A12345"
}
]
}
]
}
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 |
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"
}
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": "5Hb8J6w14MdeAq3owKmfTVcwy6TKqhfVj9DV2VtWCZES",
"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": "7MkABERLqL3FTNouykXtftkyBoseza4KfQ6YKQcS1xH6",
"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
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'.
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'.
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.
TRANSACTIONS
Transaction Types
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.net/api/v1/p/company/<COMPANY_ID/transfer"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
-H "Content-Type: application/json"
-d "
{
"wallet_id": "HUnmEJEgYeNYj2pTH8rAnd0mgjHqhj9iadgVQgRKMk",
"counterparty_wallet_address": "D1h4cyu5MJWDSgo6[email protected]113tKZ3vDkNiPXVrs6QuSP",
"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'.
Response
EXAMPLE TRANSFER RESPONSE
{
"tx_id": "9827feec4e**********a7c3b97add"
}
The Response is a Transaction ID tx_id.
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 |
Returns
Returns all whitelisted addresses for that fund.
EXAMPLE FUND WHITELIST RESPONSE
{
"total_count": 2,
"list": [
{
"name": "Rosa_wallet",
"asset": "BTC-TESTNET",
"address": "bc1qgr090h********rlaytx5v7ytm2ktq98"
},
{
"name": "Alice_wallet",
"asset": "BTC",
"address": "tb1qd5jkskt********qsgta2ncrgkx7ud8"
}
]
}
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.net/api/v1/p/company/<COMPANY_ID>/withdraw"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
-H "Content-Type: application/json"
-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.
- A Maker posts their quote.
- The quote is authorized by the Maker's Custodians.
- The quote is added to the Liquidity Hub
- A potential Taker views quotes on the Liquidity Hub
- A Taker uses the swap transaction_id to take the quote.
- The quote is authorized by the Taker's Custodians
- The Atomic swap completes in a single transaction.
Create Atomic Swap (Maker)
EXAMPLE ATOMIC SWAP MAKE REQUEST
curl -X POST "https://api.qredo.net/api/v1/p/company/<MAKER_COMPANY_ID>/atomicswap/make"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
-H "Content-Type: application/json"
-d "
{
"send_wallet_id": "nLQtaZgx49s2sa7dD1K8unLQtaZgx49s",
"receive_wallet_id": "2sa7dD1K8unLQtaZgx49snLQtaZgx49s",
"expires": 1640998800,
"reference": "CX15R99XX",
"send": {
"symbol": "BTC",
"amount": 800
},
"receive": {
"symbol": "ETH",
"amount": 2536
}
}
EXAMPLE ATOMIC SWAP MAKE RESPONSE
{
"tx_id": "bda3daa7c3************eec4eae4e80",
"tx_url": "https://qredo.network/aswp<tx_id>"
}
Prerequisites:
Select a fund with required assets and quantities to swap with. (fund_id)
Make your quote. Specify the the assets and quantities you want to send and receive.
Set an expiry time for the swap.
Use this endpoint to make a quote and initiate an Atomic Swap.
POST https://api.qredo.net/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 |
See 'Example Atomic Swap Make Request'
Response
The Response is a unique Swap Transaction ID tx_id and Transaction URL tx_url.
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 |
Response
The Transaction Object is returned. 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.net/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.net/api/v1/p/company/{company_id}/atomicswap/take"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
-H "Content-Type: application/json"
-d "
{
"swap_id": "1l65SpjcfhSEgjObPPHU7vwTNzb",
"send_wallet_id": "1l62uLH2KKuXpb4hNIgp7DLWGRN",
"receive_wallet_id": "2sa7dD1K8unLQtaZgx49snLQtaZgx49s",
"reference": "CX15R99XX"
}
Use the Swap transaction_id from the Maker to perform the Swap.
View Atomic Swap Status to ensure it has been authorized
Select a fund with the required assets and quantities to receive and send.
Use this endpoint to take the quote before it expires.
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'
Response
The Response is a unique Swap Transaction ID tx_id.
View Transaction Status using the tx_id
View Holdings to confirm the Swap has executed.
View Status of 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 |
Response
The Transaction Object is returned. 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.net/api/v1/p/company/{company_id}/liquidityhub"
-H "accept: application/json"
-H "X-API-KEY: <YOUR_API_KEY>"
-H "Content-Type: application/json"
-d "
{
"tx_id": "1lm519eiGT**********HrEYvSBuSn"
}
Use this endpoint to add your swap to the Liquidity Hub.
POST https://api.qredo.net/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. |
Response
A standard HTTP 200 OK Response indicates a swap_transaction_id has been added successfully.
Retrieve all Active Swaps
Use this endpoint to retrieve all active swaps in the Liquidity Hub.
GET https://api.qredo.net/api/v1/p/company/{company_id}/liquidityhub
Response
A list of active swaps is returned. (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 |
Response
The Ledger Object is returned. 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) |
Response
The Transaction Object is returned. See 'Example Transaction Object'.
Transfer Status Codes
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) |
Response
The Transaction Object is returned. 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. |
CONNECTING WITH 3rd PARTIES
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
EXAMPLE SWEEP REQUEST RESPONSE
{
"tx_id": "9827feec4eae4e80bda3daa7c3b97add"
}
A transaction ID is returned.
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 is returned.