Trading read APIs
Understand your account configuration
Once Anchorage enables and configures your trading account we recommend using the following end points to confirm the configuration aligns with your expectations.
- List trading accounts. Begin by listing the trading accounts associated with your Organization. This provides you with the enabled status, the account ID, and the name of each trading account. Note Anchorage will typically only open a single trading account for each legal entity.Most history and status requests can be made with either "Read trade activity" permissions or "Execute trades" permissions. However, if you only have "Execute trades" you will only receive orders, trades, and settlements available to the API Key.
Note that yourtradingAccountId is not the same as your vaultId which is tied to a specific Custody vault.
Check limits and balances. Most accounts trade via pre-deposit meaning you must fund your account prior to conducting trades. If this is the case, steps 2.iii and 2.iv should return 0 or null values. Credit limits, for those they apply to, can be provided to the specific trading account and/or at a parent level allowing for more flexible allocation across child accounts. Step 2.ii will check the account level and step 2.iii reviews the organization limits.
- List trading account balances. Use the account ID(s) provided in the list trading accounts response to check the balances for each of the trading accounts listed. This will provide the current pre-funded balance for the account in question.
- Get trading account credit and limit usage. Use the account ID(s) provided in the list trading accounts response to check the credit limit associated with each trading account. The response will also provide the current usage of that credit limit. Note the usage will only include active unsettled trades.
When clients view their pre-funded trading limits in the web dashboard or via API, they will see two values:- creditLimitAmount:
Refers to the pre-funded trading balance at the start of the client's trading period, denoted in USD. This will not change unless the client and Anchorage Digital agree upon a new pre-funded trading limit. - creditSpendAmount—also known as "outstanding" on the web dashboard:
Identifies how much of the limit the client has used and is updated after each trade is accepted. This amount is updated based on the amount of trading activity and the buy or sell side of the trade placed. This will vary depending on the netted amount owed, as determined by the "outstanding trading positions" endpoint. This is denoted in USD.
- creditLimitAmount:
- Get credit limit details (organization level). Check the credit limit applied to your organization. This may differ from the limit applied to individual accounts and does not include current usage.
- List supported trading pairs. Review the trading pairs supported for your organization. Depending the Anchorage entity the organization is associated with (e.g., Anchorage Digital Bank, Anchorage Digital Singapore, A1), different trading pairs are supported.
The full list of read APIs related to account configuration are provided below.
| Endpoint | Required permissions | Overview | Notes |
|---|---|---|---|
| List trading accounts | Read trade activity | Provides the account ID, name, and status (enabled or disabled) for each trading account associated with the Organization. | Trading accounts must be created and enabled by the Anchorage team. If no account has been created you will receive a Forbidden error regardless of your API permissions. |
| Get trading account by ID | Read trade activity | Provide the name, ID, and enabled status of a specific trading account. | |
| List trading account balances | Read trade activity | Provides the pre-funded balances for each trading account. | Balances will not include outstanding trades activity. |
| Get trading account credit and limit usage | Read trade activity | Provides the credit limit of a specific account and the current usage (if applicable). | Only applicable for trading accounts on credit. Usage only considered outstanding trades. |
| Get credit limit details (Organization level) | Read trade activity | Provides the credit limit set at the organization level (if applicable). | Only applicable for trading accounts on credit. Does not consider usage. |
| List supported trading pairs | Execute trades or Read trade activity | Provides the set of supported pairs for the organization. |
Order, trade, settlement history and status
Anchorage APIs support listing order, trades, and settlements as well as selecting an individual action by ID.
Most history and status requests can be made with either "Read trade activity" permissions or "Execute trades" permissions. However, if you only have "Execute trades" you will only receive orders, trades, and settlements available to the API Key.
Get prior trade information
Anchorage offers five endpoints aimed at providing a list of an organization's activity. Each request can be filtered by date and time, among other factors such as status, trading accounts, and trading pair. These include:
- List orders. Lists all orders placed. Note that accepted quotes from RFQ are not considered orders and will not appear in this list.
- List trades. List all trades. This provides the trade ID, status, and details of each trade. The request can be filtered for a number of parameters.
- List outstanding trades. A filtered version of list trades which only presents outstanding trades.
- List settlements. List all settlements. Provides the Settlement ID and details for each settlement.
- List trades by settlement Use the settlement ID to list the underlying trade or trades the settlement covered.
Get specific order, trade, or settlement status
The action IDs provided when creating an action or through the list end points above can be used to get a specific action through one of the following end points. Note, these calls will only presents actions created by your organization.
- Get order by ID Get a specific order including status information
| Status | Explanation |
|---|---|
| Pending | The order is queued and awaiting processing. |
| New | The order has been accepted and is active. |
| Partially filled | The order has been partially executed, but not completely filled. |
| Filled | The order has been fully executed. |
| Rejected | The order was not accepted due to some error or invalid parameters. |
| Pending Cancel | A request to cancel the order has been submitted, but it is not yet confirmed. |
| Canceled | The order has been canceled and is no longer active. |
- Get trade by ID Get a specific trade including status information.
| Status | Explanation |
|---|---|
| Pending | When a client requests to accept a quote, the trade will be marked and returned as PENDING upon success. Note: This is a temporary status and will be updated shortly after Anchorage Digital receives full trade information from market makers. Trade details will not work against clients while pending. |
| Executed | When the filled price and fees become available, the trade will be updated to be EXECUTED before a settlement is created. |
| Settling | Once the client has sent their netted owed balances to Anchorage Digital the trade will move to SETTLING. |
| Settled | After Anchorage Digital has sent its netted owed balances to the client the trade will move to SETTLED. |
| Rejected | This trade has failed, likely due to asset volatility outside of designed slippage or an insufficient pre-funded trading limit. The trade will move to REJECTED. |
| Canceled | The trade was canceled manually and will move to CANCELED. |
- Get settlement by ID Get a specific settlement.
| Status | Explanation |
|---|---|
| Pending | Settlement has been created. |
| Settling | Settlement is in progress, owed funds are being sent. |
| Settled | Anchorage Digital has sent its netted owed balances. This is a terminal state. |
| Canceled | The settlement was manually canceled. This is a terminal state. |
| Executed | This settlement has been created. This is a deprecated status which will be moved to PENDING in the future. Please expect either EXECUTED or PENDING to have a smooth transition. |
Updated 9 months ago