openapi: 3.0.0
info:
version: 2.0.0
title: Anchorage Digital API Reference Addresses Collateral Management API
contact:
email: api@anchorage.com
description: "# Introduction\n*CONFIDENTIAL: Please do not distribute this documentation externally without prior Anchorage Digital approval.*\n\n\nThe Anchorage Digital REST API v2.0 provides a set of operations and resources that allow Anchorage Digital clients and partners to:\n - Programmatically transfer funds from an Anchorage Digital vault or wallet without human intervention\n - Create and list deposit addresses in a vault\n - Read and monitor vault balances\n - Query transaction history including deposits\n - Request quotes from and execute trades with the Anchorage Digital trading desk\n\n\nWant help or to share your opinion on how this API works for you? Please contact api@anchorage.com.\n\n\n# Authentication and Security\n\nThe Anchorage Digital API performs authentication and authorization via a combination of:\n\n\n* An API key, which is a bearer token\n\n* A permission group signed by the user's organization, which is linked to the API key\n\n* An Ed25519 Signature, which comes from a user-generated key and is required for certain requests\n\n\n## Permission Groups\n\n\nA permission group acts as a set of rules for how an organization and its resources can be accessed. Permission groups are created independently of API keys, and new permission groups must be created prior to making an API key.\n\n\nEach permission group has a name, a description and a set of permissions which can be applied to your organization's vaults. Updating, creating and deleting permissions groups require a quorum of approvals. After creation, a permission group can be freely assigned to an unlimited number of API keys.\n\n\nEach API key inherits its permissions from the associated permission group. When the permission group is updated, all API keys associated with it will inherit the updated permission set. If a permission group is deleted, all associated API keys will no longer work.\n\n\nEach organization is created with a default permission group that allows read-only access. This permission group may be modified or deleted at any time, and no API keys are created by default with this permission group.\n\n\n### Permissions\n\n\nPossible vault permissions include the following:\n\n\n
\n \n | Read vault activity (READ) | \n See an overview of your vault(s) and wallets. Read vault details, balances, asset types, transaction history and deposit addresses. | \n
\n \n | Create address (CREATE_DEPOSIT_ADDRESS) | \n Receive deposits in the vault from external sources. Create and read deposit addresses. | \n
\n \n | Transfer funds (TRANSFER) | \n This permission is configurable to enable an API key endowed with this permission to either 1) Transfer funds to any Anchorage Digital institutional account, including those outside of your organization or 2) Transfer funds to any blockchain address not custodied by Anchorage Digital that has gone through quorum approval. | \n
\n \n | Propose and accept settlements (PROPOSE_ACCEPT_SETTLEMENTS) | \n This is an Atlas specific permission for initiating settlements. | \n
\n \n | Authorize settlements (AUTHORIZE_SETTLEMENTS) | \n This is an Atlas specific permission for authorizing settlements after they've been proposed or accepted. | \n
\n
\n\n\nThere are also special vault permissions for enabled by Anchorage Digital on a per-organization basis:\n\nAdditionally, there are global permissions which apply to the entire organization:\n\n\n\n \n | Initiate withdrawals (INITIATE_WITHDRAWAL) | \n Initiate withdrawals to external destinations. All withdrawals require quorum approval through the Anchorage Digital mobile app. | \n
\n \n | Execute trades (TRADE) | \n Request for quotes (RFQ) from the Anchorage Digital trading desk. Create and accept quotes. Read data of trades and settlements created by this key. | \n
\n \n | Read trade activity (READ_TRADE) | \n Read trade activity and trade settlements data of your organization. | \n
\n \n | Read lending activity (LENDER_READ) | \n Read lending activity of your organization. | \n
\n \n | Read facility data (FACILITY_ONLY) | \n Read lending facility data. | \n
\n \n | Read deposit attribution activity (READ_DEPOSIT_ATTRIBUTION) | \n Read deposit attribution activity of your organization. | \n
\n \n | Manage deposit attributions (DEPOSIT_ATTRIBUTION) | \n Read deposit attribution activity of your organization. Perform deposit attributions. | \n
\n \n | Initiate Staking and Unstaking (STAKE) | \n Initiate staking or unstaking operation. All operations require quorum approval through the Anchorage Digital mobile app. | \n
\n
\n\n\n### Example Workflow - Allow transfers from specific vaults\n\nTo create an API key with the ability to transfer funds from an Anchorage Digital vaults or wallet, a permission group must first be created with the **Transfer funds** permission for the desired source vaults. Creating this permission group requires a quorum of approvals on the Anchorage Digital iOS app. Once the creation is confirmed, any number of API keys may be created with this permission group in the Anchorage Digital Web Dashboard under the API 2.0 section.\n\nTo add additional permissions to the API key, update the associated permission group through the Anchorage Digital Web Dashboard. To revoke any permissions, the individual API key may be revoked, or the permission group may be updated or deleted to remove Transfer access.\n\n## API Keys\n\nAll API requests must be made over HTTPS and must include authentication using the following scheme.\n\n\n\n### Generating an API Key\n\nIn order to make a valid API request, you must first create an API key. API keys can be created and managed in the Anchorage Digital Web Dashboard under the [API 2.0 tab](https://anchoragelogin.com/api). When you create an API key, there are 3 pieces of information you will need to remember:\n - API access key\n - Ed25519 public key (optional for read-only requests)\n - Ed25519 private/signing key (optional for read-only requests)\n\nYou must generate an Ed25519 signing key pair and save the public portion in the Anchorage Digital Web Dashboard when creating the API access key. The signing key pair is used for added security with sensitive requests.\n\nPlease note, Anchorage Digital cannot recover your API access key or private signing key if you forget them. You may generate a new access key and signing key at any time if you lose access.\n\n### API Key Permissions\n\nEach API key is associated with a permission group. This permission group specifies the permitted actions for all associated API keys. Read more about permission groups [here](#section/Authentication-and-Security/Permission-Groups).\n\n### Creating a request\n\nAll requests must include the `Api-Access-Key` header, which contains your API access key as a string.\n\nEndpoints that require a signature must include the `Api-Signature` and `Api-Timestamp` headers. Read more about signatures [here](#section/Authentication-and-Security/Signatures).\n\nAll request bodies must be valid JSON and have the content type `application/json`.\n\n## Request Signatures\n\nCertain endpoints require an Ed25519 signature to be provided alongside the API key. These endpoints will specify the `Api-Signature` and `Api-Timestamp` headers as additional parameters.\n\nSignatures are optional unless explicitly required, but are encouraged for all requests. If a signature is provided, it will be verified.\n\n### Signing Keys\n\nA signing key pair is generated by the user and the corresponding public key must be provided when creating an API key.\n\nWhen creating an API key, you will be prompted to provide an Ed25519 public key. You must use the associated Ed25519 signing key (private key) when creating signatures for requests from this API key.\n\nPlease note that signing keys (Ed25519 private keys) should be stored securely by the user. The signing key should only be used to derive request signatures and should never be sent in a request. Anchorage Digital will never request you share your private key.\n\n### Generating a Signing Key\n\nThe user must securely generate an Ed25519 key pair on their own hardware and retain both the public and private portions. The Anchorage Digital API accepts a 64-character (32 bytes) hex-encoded Ed25519 public key when creating an API access key.\n\n\n#### Code sample (Python)\n\n*Generate a new signing key pair*\n\n```python\n# https://pypi.org/project/PyNaCl/\n\nimport nacl\nimport nacl.signing\nimport secrets\n\nseed = secrets.token_bytes(32)\n\n# Generate a new random signing key\nsigning_key = nacl.signing.SigningKey(seed)\n\n# Obtain the hex-encoded signing key\nprint('Signing key:')\nprint(signing_key.encode().hex())\n\n# Obtain the hex-encoded verify key for the given signing key\n# Use this in the Anchorage Digital Web Dashboard when creating an API key\nprint('Public key:')\nprint(signing_key.verify_key.encode().hex())\n```\n\n\n### Signing a Request\n\nTo sign a request, generate a request signature using the Ed25519 private (signing) key and provide it alongside the request in the `Api-Signature` header.\n\nTo create a request signature, first concatenate the `timestamp`, `method`, `request path`, and `body` into a string. Then, create a signature of this message using the Ed25519 private key and hex-encode the output. Use this value as the `Api-Signature` header and use the `timestamp` value as the `Api-Timestamp` header.\n\n- The `method` is an uppercase HTTP method (ex. `GET`, `POST`, `DELETE`)\n- The `request path` should contain all query parameters (ex. `/v2/transfers?foo=bar&baz=bang`)\n- The `body` is a stringified HTTP request body\n- The `body` should be omitted if the request does not contain a body (ex. a `GET` or `DELETE` request)\n- The `timestamp` is the same as the `Api-Timestamp` header\n- The `timestamp` is a number of seconds since the Unix Epoch in UTC, and must be within one minute of the API service's time when the request is received\n\n### Reference signature\n\nTo verify your signature generation code is correct, generate a signature for the following request and timestamp using the provided signing key. If the generated signature matches the signature below, your signature generation code is correct.\n\n\n\n \n | Timestamp | \n 1577880000 | \n
\n \n | HTTP Method (Uppercase) | \n POST | \n
\n \n | HTTP Path + query | \n /v2/transfers?foo=bar&baz=bang | \n
\n \n | HTTP Body | \n {\"source\": {\"id\": \"1c920f4241b78a1d483a29f3c24b6c4c\", \"type\": \"VAULT\"}, \"assetType\": \"ETH\", \"destination\": {\"id\": \"55e89d4a644d736b01533a2ea9b32a20\", \"type\": \"VAULT\"}, \"amount\": \"1000.00000000\"} | \n
\n \n | Signing Key (Ed25519 Private Key Seed) | \n 0101010101010101010101010101010101010101010101010101010101010101 | \n
\n \n | Public Key | \n 8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5c | \n
\n \n | Signature | \n 4bf42054bf7db1f8a2a2bc83d2a108502ee7a9d2ac7a2738adc2f932922446786fb9be1bd1eb475023296c6cba4ddbe28b04baca4b7521b1f1840a4ffd2b4d0d | \n
\n
\n\n## Reference clients\n\n### Python (with `requests` library)\n\n*Authorize and sign requests*\n\n```python\n\n# https://pypi.org/project/PyNaCl/\n\nfrom nacl import signing\n\nimport time\n\nimport requests\n\n\nclass AnchorageAuth(requests.auth.AuthBase):\n ACCESS_KEY_HEADER = \"Api-Access-Key\"\n SIGNATURE_HEADER = \"Api-Signature\"\n TIMESTAMP_HEADER = \"Api-Timestamp\"\n\n access_key: str\n signing_key: signing.SigningKey\n\n def __init__(self, access_key: str, signing_key_seed: bytes):\n self.access_key = access_key\n self.signing_key = signing.SigningKey(signing_key_seed)\n\n def __call__(self, r: requests.PreparedRequest):\n r.headers[self.ACCESS_KEY_HEADER] = self.access_key\n\n timestamp = str(int(time.time()))\n method = r.method.upper() if r.method else \"GET\"\n body: bytes = bytes()\n if r.body and isinstance(r.body, bytes):\n body = r.body\n elif r.body and isinstance(r.body, str):\n body = bytearray(r.body, \"utf-8\")\n message = b\"\".join(\n [bytearray(timestamp, \"utf-8\"), bytearray(method, \"utf-8\"), bytearray(r.path_url, \"utf-8\"), body]\n )\n signature = self.signing_key.sign(message).signature.hex()\n r.headers[self.SIGNATURE_HEADER] = signature\n r.headers[self.TIMESTAMP_HEADER] = timestamp\n return r\n\n\n# load secrets\n\n# Use the API key generated in the Anchorage Digital Web Dashboard\n\naccess_key = ...\n\n# Use the Ed25519 signing private key\n\nsigning_key_str = ... # load the raw string\n\nsigning_key = bytes(bytearray.fromhex(signing_key_str))\n\ndata = {}\n\nanchorage_auth = AnchorageAuth(access_key, signing_key)\n\nr = requests.post(\"https://api.anchorage.com/v2/transfers\", data=data, auth=anchorage_auth)\n\n```\n\n### Ruby - Reproduce reference signature\n```ruby\n require \"ed25519\"\n require \"net/http\"\n require \"time\"\n\n def hex_to_bin(s)\n [s].pack('H*')\n end\n\n def bin_to_hex(s)\n s.unpack('H*').first\n end\n\n private_key_seed_hex = '0101010101010101010101010101010101010101010101010101010101010101'\n public_key_hex = '8a88e3dd7409f195fd52db2d3cba5d72ca6709bf1d94121bf3748801b40f6f5c'\n key_pair_hex = private_key_seed_hex + public_key_hex\n\n key_pair = hex_to_bin(key_pair_hex)\n\n signing_key = Ed25519::SigningKey.from_keypair(key_pair)\n\n timestamp = '1577880000' # Time.now.to_i.to_s\n\n req = Net::HTTP::Post.new('/v2/transfers?foo=bar&baz=bang')\n req.body = '{\"source\": {\"id\": \"1c920f4241b78a1d483a29f3c24b6c4c\", \"type\": \"VAULT\"}, \"assetType\": \"ETH\", \"destination\": {\"id\": \"55e89d4a644d736b01533a2ea9b32a20\", \"type\": VAULT\"}, \"amount\": \"1000.00000000\"}'\n\n signature = signing_key.sign(timestamp + req.method + req.path + req.body)\n\n req['Api-Access-Key'] = 'YOUR_ACCESS_KEY'\n req['Api-Timestamp'] = timestamp\n req['Api-Signature'] = bin_to_hex(signature)\n\n puts bin_to_hex(signature)\n```\n\n# Errors\n\n\nThe Anchorage Digital API returns standard HTTP error codes for each API request.\n\n\n\n \n | Response Code | \n Description | \n
\n
\n | 200 OK | \n The request was successful. | \n
\n \n | 400 Bad Request | \n The request was improperly formed and could not be understood by the server, often due to invalid syntax, insufficient funds, or a missing required parameter. | \n
\n \n | 401 Unauthorized | \n The request was missing a valid API key. | \n
\n \n | 403 Forbidden | \n The provided API key does not have permission to perform the requested action. | \n
\n \n | 404 Not Found | \n The requested resource does not exist. | \n
\n \n | 409 Conflict | \n The requested resource cannot proceed with the requested action because it is not in the required state. | \n
\n \n | 429 Too Many Requests | \n Too many requests have been sent in a given amount of time. | \n
\n \n \n 500 Internal Server Error\n \n 502 Bad Gateway\n \n 503 Service Unavailable\n \n 504 Gateway Timeout\n | \n Something went wrong on Anchorage’s side. We have been alerted and are working on it. | \n
\n
\n\n\nIn addition to returning HTTP error codes for failed requests, the Anchorage Digital API includes a readable error message describing what went wrong in the response body.\n\n\n\n\n\n# Idempotency\n\n\nCertain endpoints support idempotent requests so that a given request can be safely retried without performing the same operation twice. For example, if a request to transfer funds does not respond due to network issues, you can retry the request using the same idempotent ID to ensure that only one transfer is created.\n\n\nEndpoints that support idempotent requests have an optional `idempotentId` field that can be included in the body of the `POST` request. Provide a unique string using your method of choice (such as a v4 UUID).\n\n\nIf a request is valid, Anchorage Digital will save the request indefinitely. If a subsequent request is received with the same `idempotentId` we will return the previously saved response for that `idempotentId`.\n\n\n# Rate Limits\n\n\nKeys provisioned by an Organization share one common rate limit. API requests are limited to 20 requests per second per Organization, allowing for bursts of up to 100 requests within a single second.\n\n\n# Pagination\n\n\nCursor pagination is used for REST endpoints which return multiple data points. Pagination allows for fetching data after the current page and specifying how many records to return. The `next` cursor is available in responses with the `page` attribute. Requests should use the `next` cursor URL to query subsequent data. Query parameter `afterId` specifies the last record previously retrieved. Some endpoints instead use the `endDate` parameter to specify the end date and older for records to retrieve. Query parameter `limit` specifies the maximum number of records in a response.\n\n## Parameters\n\n\n \n | Parameter | \n Description | \n
\n | afterId | \n Request page after (older than) this pagination id. | \n
\n \n | endDate | \n Request records older than this date (YYYY-MM-DD format). Used for /trading/trades and /trading/settlements resources. | \n
\n \n | limit | \n Maximum number of results requested. Default usually 25, but varies depending on resource. | \n
\n
\n\n## Example\n\n`GET /v2/transfers?afterId=1968b94b09b8a1a8a381775d1f04978c424d891d50e517774bf984297985b471&limit=100`\n\n## Next cursor\n\nThe `next` cursor is a URL which references the last record in a set of records. When queried, the `next` cursor URL will return subsequent records, but otherwise using the same query parameters."
servers:
- url: https://api.anchorage-staging.com/v2
security:
- Api-Access-Key: []
tags:
- description: ''
name: Collateral Management
paths:
/collateral_management/packages:
get:
operationId: getCMPackages
summary: List packages
description: 'Permissions required: **Read vault activity**
Get collateral packages.'
parameters:
- name: afterId
in: query
description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
schema:
type: string
- name: limit
in: query
description: Maximum number of results to return per query
schema:
type: integer
format: int64
default: 30
maximum: 100
minimum: 1
responses:
'200':
description: packages
content:
application/json:
schema:
$ref: '#/components/schemas/CMPackagesResponse'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
tags:
- Collateral Management
post:
operationId: createCMPackage
summary: Create a new collateral package
description: 'Permissions required: **Manage Collateral Packages** and **Read vault activity**
Creates a new collateral package in the Collateral Management service.'
parameters:
- name: Api-Signature
in: header
description: "A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.\n\n\n\nConstruction example:\n\n ```\n toHex(\n ed25519Sign(\n signing_key,\n '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)\n )\n )\n ```\n"
required: true
schema:
type: string
pattern: ^[0-9A-Fa-f]{128,160}$
- name: Api-Timestamp
in: header
description: Current timestamp, represented as unix epoch seconds
required: true
schema:
type: integer
format: int64
requestBody:
description: The details for creating a new collateral package
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CMCreatePackageRequest'
responses:
'201':
description: Successfully created collateral package
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCMPackageResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
tags:
- Collateral Management
/collateral_management/packages/{packageId}:
patch:
operationId: updateCMPackage
summary: Update a collateral package
description: 'Permissions required: **Manage Collateral Packages** and **Read vault activity**
Updates an existing collateral package in the Collateral Management service.'
parameters:
- name: packageId
in: path
description: The unique identifier of the package to update.
required: true
schema:
type: string
- name: Api-Signature
in: header
description: "A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.\n\n\n\nConstruction example:\n\n ```\n toHex(\n ed25519Sign(\n signing_key,\n '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)\n )\n )\n ```\n"
required: true
schema:
type: string
pattern: ^[0-9A-Fa-f]{128,160}$
- name: Api-Timestamp
in: header
description: Current timestamp, represented as unix epoch seconds
required: true
schema:
type: integer
format: int64
requestBody:
description: The details for updating an existing collateral package
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CMUpdatePackageRequest'
responses:
'200':
description: Successfully updated collateral package
content:
application/json:
schema:
$ref: '#/components/schemas/CMPackage'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'404':
description: The specified package was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
tags:
- Collateral Management
/collateral_management/exposures:
get:
operationId: getCMExposures
summary: List exposures
description: 'Permissions required: **Read vault activity**
Get Exposures.'
parameters:
- name: afterId
in: query
description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
schema:
type: string
- name: limit
in: query
description: Maximum number of results to return per query
schema:
type: integer
format: int64
default: 30
maximum: 100
minimum: 1
responses:
'200':
description: exposures
content:
application/json:
schema:
$ref: '#/components/schemas/CMExposuresResponse'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
tags:
- Collateral Management
post:
operationId: createCMExposure
summary: Create a new exposure
description: 'Permissions required: **Manage Collateral Exposures** and **Read vault activity**
Creates a new exposure in the Collateral Management service.'
parameters:
- name: Api-Signature
in: header
description: "A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.\n\n\n\nConstruction example:\n\n ```\n toHex(\n ed25519Sign(\n signing_key,\n '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)\n )\n )\n ```\n"
required: true
schema:
type: string
pattern: ^[0-9A-Fa-f]{128,160}$
- name: Api-Timestamp
in: header
description: Current timestamp, represented as unix epoch seconds
required: true
schema:
type: integer
format: int64
requestBody:
description: The details for creating a new collateral exposure
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CMCreateExposureRequest'
responses:
'201':
description: Successfully created collateral exposure
content:
application/json:
schema:
$ref: '#/components/schemas/CMCreateExposureResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
tags:
- Collateral Management
/collateral_management/operations/{operationId}:
patch:
operationId: updateCMOperation
summary: Update an operation
description: 'Permissions required: **Manage Collateral Packages** and **Read vault activity**
Update an existing operation in the Collateral Management service.
Only the fields provided in the request body will be updated.'
parameters:
- name: operationId
in: path
description: The unique identifier of the operation to update.
required: true
schema:
type: string
- name: Api-Signature
in: header
description: "A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.\n\n\n\nConstruction example:\n\n ```\n toHex(\n ed25519Sign(\n signing_key,\n '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)\n )\n )\n ```\n"
required: true
schema:
type: string
pattern: ^[0-9A-Fa-f]{128,160}$
- name: Api-Timestamp
in: header
description: Current timestamp, represented as unix epoch seconds
required: true
schema:
type: integer
format: int64
requestBody:
description: The fields to update on the operation.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CMUpdateOperationRequest'
responses:
'200':
description: The updated operation.
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCMOperationResponse'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'404':
description: The specified operation was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
tags:
- Collateral Management
/collateral_management/operations:
post:
operationId: createCMOperation
summary: Create a new operation
description: 'Permissions required: **Manage Collateral Packages** and **Read vault activity**
Create a new operation in the Collateral Management service.'
parameters:
- name: Api-Signature
in: header
description: "A hex-encoded Ed25519 signature of `timestamp_epoch_seconds + uppercase(http_method) + request_path + request_body`.\n\n\n\nConstruction example:\n\n ```\n toHex(\n ed25519Sign(\n signing_key,\n '{}{}{}{}'.format(timestamp_epoch_seconds, toUpper(httpMethod), httpRequestPath, httpBody)\n )\n )\n ```\n"
required: true
schema:
type: string
pattern: ^[0-9A-Fa-f]{128,160}$
- name: Api-Timestamp
in: header
description: Current timestamp, represented as unix epoch seconds
required: true
schema:
type: integer
format: int64
requestBody:
description: Operation details
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CMCreateOperationRequest'
responses:
'201':
description: operationId
content:
application/json:
schema:
$ref: '#/components/schemas/CMOperationResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
tags:
- Collateral Management
get:
operationId: getCMOperations
summary: List collateral and exposure operations
description: 'Permissions required: **Read vault activity**
Get all the operations that were booked for collateral packages and exposures.'
parameters:
- name: afterId
in: query
description: When paginating this is used to provide the starting point for the page to fetch (retrieved from the previous response body)
schema:
type: string
- name: limit
in: query
description: Maximum number of results to return per query
schema:
type: integer
format: int64
default: 100
maximum: 100
minimum: 1
responses:
'200':
description: operations
content:
application/json:
schema:
$ref: '#/components/schemas/CMOperationsResponse'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
tags:
- Collateral Management
/collateral_management/price_sources:
get:
operationId: getCMPriceSources
summary: Get available assets for specific price sources
description: 'Permissions required: **Read vault activity**
Returns the assets (trading pairs) available for specific price sources (exchanges).
This endpoint queries live price data from the Kafka cache and returns supported exchanges.
Optionally filter by a specific exchange using the ''exchange'' query parameter.'
parameters:
- name: exchange
in: query
description: Optional filter to return data for a specific exchange only.
required: false
schema:
$ref: '#/components/schemas/CMPriceSource'
responses:
'200':
description: Price sources with their available assets
content:
application/json:
schema:
$ref: '#/components/schemas/CMPriceSourcesResponse'
'401':
description: Unauthenticated
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'404':
description: Requested exchange is not available or not in the supported list
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
'501':
description: Not Implemented - collateral management price sources feature is disabled
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorDetails'
tags:
- Collateral Management
components:
schemas:
CMUpdateOperationRequest:
description: Fields for updating a Collateral Management operation. Any fields left null or omitted will not be updated.
type: object
properties:
action:
$ref: '#/components/schemas/CMOperationActionInput'
asset:
$ref: '#/components/schemas/CMAssetType'
notes:
description: Optional notes or comments related to the operation. Providing a new value will overwrite existing notes.
type: string
quantity:
description: The quantity of the asset to be used in the operation, expressed as a decimal string.
type: string
type:
$ref: '#/components/schemas/CMOperationTypeInput'
typeId:
description: The ID of the collateral package (packageId) or exposure (exposureId) for this operation
type: string
CMExposuresResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CMExposure'
page:
$ref: '#/components/schemas/Page'
required:
- data
- page
CMDeleveragingLevel:
description: A single deleveraging level defining a price trigger and liquidation amount
type: object
properties:
liquidationPercentage:
description: The percentage of collateral to liquidate when this price level is reached, expressed as a decimal string (e.g., '25' for 25%)
type: string
price:
description: The price threshold at which this deleveraging level is triggered, expressed as a decimal string
type: string
required:
- price
- liquidationPercentage
CMOperationActionInput:
description: 'The specific action to be performed in the operation.
Valid actions for exposures are:
1. `INITIAL_FUNDING`
2. `PAY_DOWN`
3. `PAY_UP`
4. `INTEREST_PAYDOWN`
5. `INTEREST_ACCRUAL`
Valid actions for collateral packages are:
1. `INITIAL_DEPOSIT`
2. `MARGIN_RETURN`,
3. `TOP_UP`
4. `CLOSE_RETURN`.
5. `REHYPE_IN`
6. `REHYPE_OUT`
'
type: string
enum:
- INITIAL_DEPOSIT
- INITIAL_FUNDING
- MARGIN_RETURN
- PAY_DOWN
- PAY_UP
- INTEREST_PAYDOWN
- INTEREST_ACCRUAL
- TOP_UP
- CLOSE_RETURN
- REHYPE_IN
- REHYPE_OUT
CMOperationTypeInput:
description: The type of entity the operation is being performed on. This can be either a `COLLATERAL_PACKAGE` or an `EXPOSURE`.
type: string
enum:
- COLLATERAL_PACKAGE
- EXPOSURE
CMAssetTrackingConfigUpdate:
description: Asset tracking configuration for updates. All fields are optional except asset which identifies which asset to update.
type: object
properties:
asset:
$ref: '#/components/schemas/CMAssetType'
liquidationPriority:
description: The priority order for liquidating this asset in the event of a default or margin call
type: integer
maxStalenessMinutes:
description: Optional maximum staleness in minutes assigned to the asset price in the collateral package configuration, expressed as an integer. If not specified, uses the system default configured (3 minutes)
type: integer
notes:
description: Optional additional notes or comments about the asset tracking configuration
type: string
priceSource:
$ref: '#/components/schemas/CMPriceSource'
weight:
description: The configured weight assigned to the asset in the collateral package configuration, expressed as a decimal string
type: string
required:
- asset
CMExposureAssetTrackingConfig:
description: CM Exposure Asset tracking config
type: object
properties:
asset:
$ref: '#/components/schemas/CMAssetType'
liquidationPriority:
description: The priority order for liquidating this asset in the event of a default or margin call
type: integer
notes:
description: Optional additional notes or comments about the asset tracking configuration
type: string
priceSource:
$ref: '#/components/schemas/CMPriceSource'
required:
- asset
- liquidationPriority
CMPackageActionMarginCall:
description: The action to be taken when the collateral package transitions into a Margin Call state
type: string
enum:
- NONE
- PARTIAL
- FULL
- SWEEP
CMMarginReturnUpdate:
description: Margin Return level configuration for updates. All fields are optional.
type: object
properties:
action:
$ref: '#/components/schemas/CMPackageActionMarginReturn'
ltv:
description: The LTV threshold at which the Collateral Package will enter into this state
type: string
returnToLtv:
description: The LTV that a collateral package must return to before a margin return is fulfilled
type: string
returnType:
description: The type of margin return (e.g., LTV or QUANTITY)
type: string
CMCreatePackageRequest:
description: The request payload for creating a new collateral package.
type: object
properties:
acceleratedMarginCall:
$ref: '#/components/schemas/CMAcceleratedMarginCall'
clientReferenceId:
description: A reference identifier provided by the client for this collateral package
type: string
collateralAssetsConfig:
type: array
items:
$ref: '#/components/schemas/CMAssetTrackingConfig'
critical:
$ref: '#/components/schemas/CMCritical'
ltvRoundingPrecision:
description: Number of decimal places to round LTV values to
type: integer
marginCall:
$ref: '#/components/schemas/CMMarginCall'
marginReturn:
$ref: '#/components/schemas/CMMarginReturn'
pledgorId:
description: Collateral management participant ID of the Pledgor (borrower) associated with this collateral package
type: string
priceStrategy:
$ref: '#/components/schemas/CMPriceStrategy'
securedPartyId:
description: Unique identifier of the secured party (lender) associated with this collateral package
type: string
required:
- pledgorId
- securedPartyId
- collateralAssetsConfig
- priceStrategy
CMMarginCallUpdate:
description: Margin Call level configuration for updates. All fields are optional.
type: object
properties:
action:
$ref: '#/components/schemas/CMPackageActionMarginCall'
curePeriod:
description: The duration of the cure period, specified in a format such as '1h' for 1 hour or '1m' for 1 minute
type: string
curePeriodProtection:
description: Indicates whether cure period protection is enabled
type: boolean
ltv:
description: The LTV threshold at which the Collateral Package will enter into this state
type: string
returnToLtv:
description: The LTV that a collateral package must return to before a margin call is fulfilled
type: string
topUpType:
$ref: '#/components/schemas/CMTopUpType'
warningLtv:
description: The LTV at which a warning is sent notifying the parties that the collateral package is close to entering margin call
type: string
CMCriticalUpdate:
description: Critical level configuration for updates. All fields are optional.
type: object
properties:
action:
$ref: '#/components/schemas/CMPackageActionCritical'
defaultNotice:
description: If true, Anchorage Digital will send a default notice to the Pledgor upon entering the critical state
type: boolean
ltv:
description: The LTV threshold at which the Collateral Package will enter into the critical state
type: string
returnToLtv:
description: The LTV that a collateral package must return to before being considered healthy again
type: string
warningLtv:
description: The LTV at which a warning is sent notifying the parties that the collateral package is close to entering critical state
type: string
CMAssetTypeType:
description: The type of asset held in the Collateral Package. This can be either `ANCHORAGECUSTODY` for assets held in Anchorage custody, or `EXTERNAL` for assets held outside of Anchorage custody.
type: string
enum:
- ANCHORAGECUSTODY
- EXTERNAL
CMPriceSource:
description: This field specifies the source from which the price information is derived
type: string
enum:
- COINBASEPRO
- KRAKEN
- KAMINO
- BINANCE
CMMarginReturn:
description: Margin Return level config
type: object
properties:
action:
$ref: '#/components/schemas/CMPackageActionMarginReturn'
ltv:
description: The LTV threshold at which the Collateral Package will be eligible for a Margin Return
type: string
returnToLtv:
description: The LTV that a collateral package must return to before a margin return is considered to be fulfilled and the collateral package is returned to a healthy state
type: string
required:
- ltv
- action
- returnToLtv
CMCreateExposureRequest:
description: The request payload for creating a new collateral exposure.
type: object
properties:
assetTrackingConfig:
$ref: '#/components/schemas/CMExposureAssetTrackingConfig'
clientReferenceId:
description: 'A reference identifier provided by the client for this collateral exposure. For example: client’s internal loan ID'
type: string
collateralPackageID:
description: ID of the collateral package (packageId)
type: string
priceStrategy:
$ref: '#/components/schemas/CMPriceStrategy'
type:
$ref: '#/components/schemas/CMExposureType'
required:
- type
- collateralPackageID
- priceStrategy
- assetTrackingConfig
CMExposureType:
description: Type of exposure
type: string
enum:
- LOAN
CMPackageActionCritical:
description: The action to be taken when the collateral package transitions into a Critical state
type: string
enum:
- NONE
- PARTIAL
- FULL
- SWEEP
CMUpdatePackageRequest:
description: The request payload for updating an existing collateral package. All fields are optional - only provide the fields you want to update.
type: object
properties:
acceleratedMarginCall:
$ref: '#/components/schemas/CMAcceleratedMarginCallUpdate'
autoDeleveraging:
$ref: '#/components/schemas/CMAutoDeleveragingUpdate'
clientReferenceId:
description: A reference identifier provided by the client for this collateral package
type: string
collateralAssetsConfig:
description: Array of asset tracking configurations. If provided, this will replace the entire existing asset tracking configuration.
type: array
items:
$ref: '#/components/schemas/CMAssetTrackingConfigUpdate'
critical:
$ref: '#/components/schemas/CMCriticalUpdate'
isActive:
description: Indicates whether the package should be activated for monitoring or not
type: boolean
ltvRoundingPrecision:
description: Number of decimal places to round LTV values to
type: integer
marginCall:
$ref: '#/components/schemas/CMMarginCallUpdate'
marginReturn:
$ref: '#/components/schemas/CMMarginReturnUpdate'
priceStrategy:
$ref: '#/components/schemas/CMPriceStrategy'
CMCreateExposureResponse:
type: object
properties:
exposureId:
type: string
required:
- exposureId
CMPriceSourceAssets:
description: A price source (exchange) with its available trading pairs and pricing strategies
type: object
properties:
assets:
description: List of available trading pairs (e.g., BTC-USD, ETH-USD)
type: array
items:
type: string
priceSource:
$ref: '#/components/schemas/CMPriceSource'
strategies:
description: List of available pricing strategies for this exchange
type: array
items:
$ref: '#/components/schemas/CMPriceStrategy'
required:
- priceSource
- assets
- strategies
CMCreateOperationRequest:
type: object
properties:
action:
$ref: '#/components/schemas/CMOperationActionInput'
asset:
$ref: '#/components/schemas/CMAssetType'
idempotentId:
description: Idempotency single key
type: string
maxLength: 128
notes:
description: Optional notes or comments related to the operation
type: string
quantity:
description: The quantity of the asset to be used in the operation, expressed as a decimal string.
type: string
type:
$ref: '#/components/schemas/CMOperationTypeInput'
typeId:
description: The ID of the collateral package (packageId) or exposure (exposureId) for this operation
type: string
required:
- type
- typeId
- action
- quantity
- asset
CMOperationType:
description: The type of entity the operation is being performed on. This can be either a `COLLATERAL_PACKAGE` or an `EXPOSURE`.
type: string
enum:
- COLLATERAL_PACKAGE
- EXPOSURE
- LIQUIDATION
CMCritical:
description: Critical level config
type: object
properties:
action:
$ref: '#/components/schemas/CMPackageActionCritical'
defaultNotice:
description: A boolean parameter, if marked TRUE Anchorage will send a default notice to the Pledgor upon entering the critical state
type: boolean
ltv:
description: The LTV threshold at which the Collateral Package will enter into this state
type: string
returnToLtv:
description: The LTV that a collateral package must return to before transitioning back to a healthy state. This parameter is only configured if action within Critical Object is set to ‘Partial’
type: string
warningLtv:
description: The LTV at which a warning is sent notifying the parties that the collateral package is close to entering a particular state
type: string
required:
- ltv
- action
- defaultNotice
- warningLtv
- returnToLtv
CMPackageState:
description: Current state of the Collateral Package
type: string
enum:
- MARGIN_RETURN
- HEALTHY
- MARGIN_CALL
- CRITICAL
- CLOSED
- CURE_PERIOD_EXPIRED
- DEFAULTED
CMPackagesResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CMPackage'
page:
$ref: '#/components/schemas/Page'
required:
- data
- page
CMPriceStrategy:
description: This field specifies the pricing strategy to be used for the collateral package. To be implemented in the future
type: string
enum:
- DEFAULT
- BID
- ASK
- MID
- LAST
CMOperation:
description: In the context of Collateral Management, an operation is a recorded transaction or activity performed on either a Collateral Package or an Exposure. Operations represent specific actions that affect the balance or status of collateral or loan exposures.
type: object
properties:
action:
$ref: '#/components/schemas/CMOperationAction'
asset:
$ref: '#/components/schemas/CMAssetType'
createdAt:
description: The timestamp of when this record was created not necessarily when the operation was executed.
type: string
format: date-time
example: '2019-01-02T12:34:56.000Z'
id:
description: Unique identifier for the operation (operationId)
type: string
liquidationCollateralPackageId:
description: The unique identifier of the collateral package that is being liquidated
type: string
liquidationProceedAsset:
$ref: '#/components/schemas/CMAssetType'
liquidationProceedQuantity:
description: The decimal quantity of the proceeds received from the liquidation
type: string
notes:
description: An optional field for additional comments or contextual information related to the operation.
type: string
quantity:
description: The decimal amount of the asset being added, removed, or modified in the operation, expressed as a string
type: string
type:
$ref: '#/components/schemas/CMOperationType'
typeId:
description: Contains the unique identifier of either the collateral package (packageId) or exposure (exposureId) that the operation is being performed on, depending on the value in the type field
type: string
updatedAt:
description: The timestamp of when this record was last updated
type: string
format: date-time
example: '2019-01-02T12:34:56.000Z'
required:
- id
- type
- typeId
- action
- asset
- quantity
- createdAt
- updatedAt
CMOperationsResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CMOperation'
page:
$ref: '#/components/schemas/Page'
required:
- data
- page
CMExposure:
description: In Collateral Management, an Exposure represents a financial obligation secured by collateral assets. It refers to the amount at risk in transactions between a Pledgor (providing collateral) and a Secured Party (receiving security). Exposures can be loans, repos, or other credit arrangements, and are used to calculate risk metrics like the Loan-to-Value (LTV) ratio. Each Exposure links to a Collateral Package containing the pledged assets.
type: object
properties:
asset:
$ref: '#/components/schemas/CMAssetType'
clientReferenceId:
description: 'Client-provided reference ID for this Expsoure. “For example: client’s internal loan ID'
type: string
exposureId:
description: Unique identifier for the Exposure
type: string
packageId:
description: Identifier of the package of this exposure associated with this exposure
type: string
price:
description: The unweighted current price of the Exposure asset, used in the LTV calculation, expressed in USD
type: string
quantity:
description: The quantity of the collateral asset in the Exposure
type: string
value:
description: The value of the Exposure expressed in USD, calculated as Price * Quantity
type: string
required:
- exposureId
- clientReferenceId
- packageId
- asset
- price
- quantity
- value
UpdateCMOperationResponse:
description: Contains the full, updated operation object.
allOf:
- $ref: '#/components/schemas/CMOperation'
CMMarginCall:
description: Margin Call level config
type: object
properties:
action:
$ref: '#/components/schemas/CMPackageActionMarginCall'
curePeriod:
description: Time after the margin call that pledgor has to top up collateral and bring the LTV to the ‘returnToLtv’ (healthy state)”. The duration of the cure period, specified in a format such as '1h' for 1 hour or '1m' for 1 minute.
type: string
curePeriodProtection:
description: If activated, it prevents the transition of the collateral package to the critical stage while the cure period of a previous margin call lasts
type: boolean
ltv:
description: The LTV threshold at which the Collateral Package will enter into this state, subject to cure period constraints
type: string
returnToLtv:
description: The LTV that a collateral package must return to before a margin call is considered to be fulfilled and the collateral package is returned to a healthy state
type: string
topUpType:
$ref: '#/components/schemas/CMTopUpType'
warningLtv:
description: The LTV at which a warning is sent notifying the parties that the collateral package is close to entering a particular state
type: string
required:
- ltv
- action
- warningLtv
- returnToLtv
- curePeriod
- curePeriodProtection
- topUpType
ErrorDetails:
type: object
properties:
errorType:
$ref: '#/components/schemas/ErrorType'
message:
description: A human-readable message providing more details about the error.
type: string
example: Missing required field 'amount'.
required:
- errorType
- message
title: ErrorDetails
CMAssetTrackingConfig:
description: Asset tracking config
type: object
properties:
asset:
$ref: '#/components/schemas/CMAssetType'
liquidationPriority:
description: The priority order for liquidating this asset in the event of a default or margin call
type: integer
maxStalenessMinutes:
description: Optional maximum staleness in minutes assigned to the asset price in the collateral package configuration, expressed as an integer. If not specified, uses the system default configured (3 minutes)
type: integer
notes:
description: Optional additional notes or comments about the asset tracking configuration
type: string
priceSource:
$ref: '#/components/schemas/CMPriceSource'
weight:
description: The configured weight assigned to the asset in the collateral package configuration, expressed as a decimal string
type: string
required:
- asset
- weight
- liquidationPriority
CMPriceSourcesResponse:
description: Response containing price sources and their available trading pairs
type: object
properties:
priceSources:
description: List of price sources (exchanges) with their available assets
type: array
items:
$ref: '#/components/schemas/CMPriceSourceAssets'
required:
- priceSources
CMTopUpType:
description: Option on how to satisfy a Margin Call. If ‘LTV’ is selected, the requirement to cure the margin call is to bring the LTV below the ‘returnToLtv’ (healthy state). If ‘QUANTITY’ is selected, the requirement to cure the margin call is to provide the number of units of collateral asset calculated when the margin call was issued, regardless if LTV fluctuates during a potential cure period
type: string
enum:
- LTV
- QUANTITY
ErrorType:
description: The type of error returned.
type: string
enum:
- InternalError
- InvalidRequest
- Unauthenticated
- Forbidden
- NotFound
- Conflict
- UnprocessableEntity
- TooManyRequests
- ServiceUnavailable
- QuoteExpired
- InsufficientFunds
- NotImplemented
title: ErrorType
CMAcceleratedMarginCallUpdate:
description: Accelerated Margin Call level configuration for updates. All fields are optional.
type: object
properties:
action:
$ref: '#/components/schemas/CMPackageActionMarginCall'
curePeriod:
description: The duration of the cure period, specified in a format such as '1h' for 1 hour or '1m' for 1 minute
type: string
ltv:
description: The LTV threshold at which the Collateral Package will enter into an Accelerated Margin Call state
type: string
CMAcceleratedMarginCall:
description: Accelerated Margin Call level config
type: object
properties:
action:
$ref: '#/components/schemas/CMPackageActionMarginCall'
curePeriod:
description: The duration of the cure period for the accelerated margin call, specified in a format such as '1h' for 1 hour or '1m' for 1 minute
type: string
ltv:
description: The LTV threshold at which the Collateral Package will enter into an Accelerated Margin Call state, subject to cure period constraints
type: string
required:
- ltv
- action
- curePeriod
CMPackage:
description: A package of different types of collateral which, together, secure a collection of exposures.
type: object
properties:
acceleratedMarginCall:
$ref: '#/components/schemas/CMAcceleratedMarginCall'
active:
description: Indicates whether the package has been activated for monitoring or not
type: boolean
clientReferenceId:
description: Client-provided reference ID for this Collateral Package
type: string
collateralAssets:
description: An array containing objects, where each object represents a specific asset held within the Collateral Package and its associated details
type: array
items:
$ref: '#/components/schemas/CMCollateralAsset'
critical:
$ref: '#/components/schemas/CMCritical'
currentLtv:
description: The current Loan-to-Value (LTV) ratio for the Collateral Package, expressed as a decimal string
type: string
exposureValue:
description: The current total value of the Exposure(s) associated with this Collateral Package, expressed in USD
type: string
ltvTimestamp:
description: Timestamp indicating the last time the `currentLtv` was calculated and updated. This timestamp provides context for the recency of the LTV value
type: string
marginCall:
$ref: '#/components/schemas/CMMarginCall'
marginReturn:
$ref: '#/components/schemas/CMMarginReturn'
packageId:
description: Unique identifier for the Collateral Package
type: string
packageValue:
description: The current total value of the Collateral Package, calculated using the configured pricing methodology and real-time price data, expressed in USD
type: string
pledgorId:
description: Collateral management participant ID of the Pledgor (borrower) associated with this collateral package
type: string
securedPartyId:
description: Collateral management participant ID of the Secure Party (lender) associated with this collateral package
type: string
state:
$ref: '#/components/schemas/CMPackageState'
required:
- packageId
- pledgorId
- securedPartyId
- clientReferenceId
- active
- exposureValue
- packageValue
- collateralAssets
- critical
CreateCMPackageResponse:
type: object
properties:
packageId:
type: string
required:
- packageId
CMAssetType:
description: Asset symbol or ticker (e.g. BTC)
type: object
properties:
assetType:
type: string
type:
$ref: '#/components/schemas/CMAssetTypeType'
required:
- type
- assetType
CMOperationAction:
description: 'The specific action to be performed in the operation.
Valid actions for exposures are:
1. `INITIAL_FUNDING`
2. `PAY_DOWN`
3. `PAY_UP`
4. `INTEREST_PAYDOWN`
5. `INTEREST_ACCRUAL`
Valid actions for collateral packages are:
1. `INITIAL_DEPOSIT`
2. `MARGIN_RETURN`
3. `TOP_UP`
4. `CLOSE_RETURN`.
5. `REHYPE_IN`
6. `REHYPE_OUT`'
type: string
enum:
- INITIAL_DEPOSIT
- INITIAL_FUNDING
- MARGIN_RETURN
- PAY_DOWN
- PAY_UP
- INTEREST_PAYDOWN
- INTEREST_ACCRUAL
- TOP_UP
- CLOSE_RETURN
- FULL_LIQUIDATION
- PARTIAL_LIQUIDATION
- SWEEP
- REHYPE_IN
- REHYPE_OUT
- GAS_FEE
CMAutoDeleveragingUpdate:
description: Auto-deleveraging configuration for updates. All fields are optional.
type: object
properties:
levels:
description: Array of deleveraging levels, each specifying a price threshold and corresponding liquidation percentage. If provided, replaces all existing levels.
type: array
items:
$ref: '#/components/schemas/CMDeleveragingLevel'
CMOperationResponse:
type: object
properties:
operationId:
type: string
required:
- operationId
Page:
description: Pagination info
type: object
properties:
next:
description: URL to use to query for the next page or null if no additional results are available
type: string
example:
nullable: true
x-omitempty: false
title: Page
CMPackageActionMarginReturn:
description: The action to be taken when the collateral package transitions into a Margin Return state
type: string
enum:
- NONE
- SWEEP
CMCollateralAsset:
description: A single asset within a collaterage package
type: object
properties:
asset:
$ref: '#/components/schemas/CMAssetType'
price:
description: The unweighted current price of the collateral asset, used in the LTV calculation, expressed in USD
type: string
quantity:
description: The quantity of the collateral asset held in the Collateral Package
type: string
weight:
description: The configured weight applied to this collateral asset within the Collateral Package, expressed as a decimal string
type: string
weightedValue:
description: The weighted value of the collateral asset, calculated by applying the `weight` to the asset's value (`price` * `quantity`), expressed in USD
type: string
required:
- asset
- price
- quantity
- weight
- weightedValue
securitySchemes:
Api-Access-Key:
type: apiKey
name: Api-Access-Key
in: header
description: An API key associated with a security role
x-tagGroups:
- name: Under Development
tags:
- Collateral Management
- Holds
- Deposit Attribution
- Onboarding
- Trusted Destinations
- Atlas Settlement Network
- Tax
- name: API Endpoints
tags:
- Addresses
- Asset Types
- Transactions
- Transfers
- Wallets
- Vaults
- Vesting
- Subaccounts
- Stablecoins
- Webhook Notifications
- API Key
- Statements
- Tax Reporting
- Trading
- name: Models
tags:
- Transfer Model
- Transaction Model
- Vault Model
- Deposit Attribution Model