{"openapi":"3.1.0","info":{"title":"Ledger Account API","description":"A ledger account is a MoveUSD balance account owned by an identity or organization. Each account holds a MoveUSD balance, is backed by an on-chain Solana account, and serves as the source or target of transfers and withdrawals. Use this API to search the ledger accounts you manage and to retrieve the details of an individual account, including its current balance and address.","termsOfService":"","contact":{"name":"API Owner","email":"api@cfxlabs.com"},"license":{"name":"","url":""},"version":"@VERSION@","summary":"CFX Ledger Account API"},"components":{"securitySchemes":{"ApiKeyAuth":{"name":"x-api-key","type":"apiKey","in":"header"},"ApiSecretAuth":{"name":"x-api-secret","type":"apiKey","in":"header"}},"schemas":{}},"paths":{"/v1/ledger-accounts":{"get":{"summary":"Search for ledger accounts","tags":["Ledger Account"],"description":"Return the ledger accounts you manage, optionally filtered by owner, underlying Solana address, or creation date. Results are paginated; if no accounts match, an empty array is returned.\n\nEach account includes either an `identityId` or an `organizationId` identifying its owner, along with its current MoveUSD balance and on-chain address.","parameters":[{"schema":{"type":"string"},"in":"query","name":"addresses","required":false,"description":"Comma-separated list of base-58 addresses for the underlying Solana account"},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"createdBefore","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"createdAfter","required":false},{"schema":{"type":"string"},"in":"query","name":"orderBy","required":false,"description":"Comma-separated list of fields and directions to order the results by.\n\nFormat: `<field name>:<direction>,...`\n\n* `<field name>`: `createdAt`\n* `<direction>`: `ASC`, `DESC`"},{"schema":{"type":"integer","default":1},"in":"query","name":"page","required":false,"description":"Result page number to return, starting from 1"},{"schema":{"type":"integer","default":10,"maximum":100},"in":"query","name":"pageSize","required":false,"description":"Items per page to return"},{"schema":{"type":"string","title":"Identity"},"example":"id_xxxxxx,id_yyyyyy","in":"query","name":"identityIds","required":false,"description":"Return only the ledger accounts owned by these identities (comma-separated list of identity IDs)."},{"schema":{"type":"string","title":"Organization"},"example":"org_xxxxxx,org_yyyyyy","in":"query","name":"organizationIds","required":false,"description":"Return only the ledger accounts owned by these organizations (comma-separated list of organization IDs)."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["hasNext","items"],"properties":{"hasNext":{"type":"boolean","description":"Whether there are more pages for this search result"},"items":{"type":"array","items":{"allOf":[{"type":"object","required":["id","balance","address","visibility","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"Unique identifier for a ledger account, in `redwal_...` format","examples":["redwal_xxxxxxxx"]},"referenceId":{"type":"string","description":"Customer's reference ID for this account"},"balance":{"type":"string","description":"The balance of the ledger account"},"name":{"type":"string","description":"Human-readable label for this account"},"address":{"type":"string","description":"Base-58 address to the underlying Solana account"},"visibility":{"type":"string","enum":["PRIVATE","PUBLIC"],"description":"Visibility of the account across MoveUSD network. **WARNING: `PUBLIC` wallets are visible to all customers.**"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp of when this account was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp of when this account was last updated"}}},{"anyOf":[{"type":"object","required":["identityId"],"properties":{"identityId":{"type":"string","description":"ID of the identity that owns this ledger account","examples":["id_xxxxxx"]}},"title":"Identity"},{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string","description":"ID of the organization that owns this ledger account","examples":["org_xxxxxx"]}},"title":"Organization"}]}]},"description":"The ledger accounts matching this search, for the current page"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST"]},"message":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}}},"title":"INVALID_REQUEST","description":"The service cannot understand the request"},{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_ADDRESSES"]},"message":{"type":"string"}},"title":"INVALID_ADDRESSES","description":"Invalid `addresses` query"}]}}}},"401":{"description":"The access to this resource has been denied","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"}},"title":"UNAUTHORIZED","description":"The access to this resource has been denied"}}}},"default":{"description":"Catch-all error response for any unexpected internal errors","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INTERNAL"]},"message":{"type":"string","enum":["An unexpected internal error has occurred"]}},"title":"INTERNAL","description":"Catch-all error response for any unexpected internal errors"}}}}}}},"/v1/ledger-accounts/{id}":{"get":{"summary":"Get a ledger account details","tags":["Ledger Account"],"description":"Retrieve a single ledger account by its ID, including its current MoveUSD balance, on-chain Solana address, visibility, and the identity or organization that owns it.","parameters":[{"schema":{"type":"string"},"example":"redwal_xxxxxxxx","in":"path","name":"id","required":true,"description":"The unique identifier for the ledger account, in `redwal_...` format"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["id","balance","address","visibility","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"Unique identifier for a ledger account, in `redwal_...` format","examples":["redwal_xxxxxxxx"]},"referenceId":{"type":"string","description":"Customer's reference ID for this account"},"balance":{"type":"string","description":"The balance of the ledger account"},"name":{"type":"string","description":"Human-readable label for this account"},"address":{"type":"string","description":"Base-58 address to the underlying Solana account"},"visibility":{"type":"string","enum":["PRIVATE","PUBLIC"],"description":"Visibility of the account across MoveUSD network. **WARNING: `PUBLIC` wallets are visible to all customers.**"},"createdAt":{"type":"string","format":"date-time","description":"The timestamp of when this account was created"},"updatedAt":{"type":"string","format":"date-time","description":"The timestamp of when this account was last updated"}}},{"anyOf":[{"type":"object","required":["identityId"],"properties":{"identityId":{"type":"string","description":"ID of the identity that owns this ledger account","examples":["id_xxxxxx"]}},"title":"Identity"},{"type":"object","required":["organizationId"],"properties":{"organizationId":{"type":"string","description":"ID of the organization that owns this ledger account","examples":["org_xxxxxx"]}},"title":"Organization"}]}]}}}},"401":{"description":"The access to this resource has been denied","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED"]},"message":{"type":"string"}},"title":"UNAUTHORIZED","description":"The access to this resource has been denied"}}}},"404":{"description":"The resource was not found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["NOT_FOUND"]},"message":{"type":"string"}},"title":"NOT_FOUND","description":"The resource was not found"}}}},"default":{"description":"Catch-all error response for any unexpected internal errors","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INTERNAL"]},"message":{"type":"string","enum":["An unexpected internal error has occurred"]}},"title":"INTERNAL","description":"Catch-all error response for any unexpected internal errors"}}}}}}}},"servers":[{"url":"https://api.dev.cfx.to","description":"Customer Sandbox"},{"url":"https://api.cfx.to","description":"Production"}],"security":[{"ApiKeyAuth":[],"ApiSecretAuth":[]}],"tags":[{"name":"Ledger Account","description":"MoveUSD balance accounts owned by an identity or organization. Each account holds a MoveUSD balance, is backed by an on-chain Solana account, and is used as the source or target of transfers and withdrawals."}],"externalDocs":{"description":"Find out more about CFX","url":"https://www.cfxlabs.com/"}}