cybrid-api-bank-python 0.123.287__py3-none-any.whl → 0.125.156__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cybrid_api_bank/__init__.py +2 -2
- cybrid_api_bank/api/accounts_bank_api.py +3 -3
- cybrid_api_bank/api/assets_bank_api.py +2 -2
- cybrid_api_bank/api/banks_bank_api.py +3 -3
- cybrid_api_bank/api/counterparties_bank_api.py +5 -5
- cybrid_api_bank/api/customers_bank_api.py +5 -5
- cybrid_api_bank/api/deposit_addresses_bank_api.py +3 -3
- cybrid_api_bank/api/deposit_bank_accounts_bank_api.py +3 -3
- cybrid_api_bank/api/executions_bank_api.py +312 -0
- cybrid_api_bank/api/external_bank_accounts_bank_api.py +11 -5
- cybrid_api_bank/api/external_wallets_bank_api.py +10 -4
- cybrid_api_bank/api/files_bank_api.py +10 -4
- cybrid_api_bank/api/identity_verifications_bank_api.py +17 -5
- cybrid_api_bank/api/invoices_bank_api.py +3 -3
- cybrid_api_bank/api/payment_instructions_bank_api.py +3 -3
- cybrid_api_bank/api/persona_sessions_bank_api.py +177 -0
- cybrid_api_bank/api/plans_bank_api.py +312 -0
- cybrid_api_bank/api/prices_bank_api.py +2 -2
- cybrid_api_bank/api/quotes_bank_api.py +3 -3
- cybrid_api_bank/api/symbols_bank_api.py +2 -2
- cybrid_api_bank/api/trades_bank_api.py +4 -4
- cybrid_api_bank/api/transfers_bank_api.py +151 -4
- cybrid_api_bank/api/workflows_bank_api.py +3 -3
- cybrid_api_bank/api_client.py +2 -2
- cybrid_api_bank/apis/__init__.py +3 -0
- cybrid_api_bank/configuration.py +3 -3
- cybrid_api_bank/exceptions.py +2 -2
- cybrid_api_bank/model/account.py +3 -3
- cybrid_api_bank/model/account_association.py +322 -0
- cybrid_api_bank/model/account_list.py +2 -2
- cybrid_api_bank/model/account_state.py +2 -2
- cybrid_api_bank/model/account_type.py +2 -2
- cybrid_api_bank/model/activity_limit.py +13 -5
- cybrid_api_bank/model/activity_side.py +291 -0
- cybrid_api_bank/model/activity_type.py +6 -6
- cybrid_api_bank/model/asset.py +4 -4
- cybrid_api_bank/model/asset_list.py +2 -2
- cybrid_api_bank/model/asset_types.py +2 -2
- cybrid_api_bank/model/bank.py +2 -2
- cybrid_api_bank/model/bank_feature.py +2 -2
- cybrid_api_bank/model/bank_list.py +2 -2
- cybrid_api_bank/model/bank_supported_payout_symbols_inner.py +2 -2
- cybrid_api_bank/model/bank_type.py +2 -2
- cybrid_api_bank/model/compliance_check.py +4 -4
- cybrid_api_bank/model/compliance_check_outcome.py +7 -6
- cybrid_api_bank/model/compliance_check_type.py +2 -2
- cybrid_api_bank/model/compliance_decision.py +6 -2
- cybrid_api_bank/model/compliance_decision_state.py +2 -2
- cybrid_api_bank/model/compliance_decision_type.py +2 -2
- cybrid_api_bank/model/counterparty.py +2 -2
- cybrid_api_bank/model/counterparty_address.py +2 -2
- cybrid_api_bank/model/counterparty_aliases_inner.py +2 -2
- cybrid_api_bank/model/counterparty_list.py +2 -2
- cybrid_api_bank/model/counterparty_name.py +2 -2
- cybrid_api_bank/model/counterparty_state.py +2 -2
- cybrid_api_bank/model/counterparty_type.py +2 -2
- cybrid_api_bank/model/customer.py +2 -2
- cybrid_api_bank/model/customer_address.py +2 -2
- cybrid_api_bank/model/customer_aliases_inner.py +2 -2
- cybrid_api_bank/model/customer_list.py +2 -2
- cybrid_api_bank/model/customer_name.py +2 -2
- cybrid_api_bank/model/customer_state.py +2 -2
- cybrid_api_bank/model/customer_type.py +2 -2
- cybrid_api_bank/model/deposit_address.py +2 -2
- cybrid_api_bank/model/deposit_address_format.py +2 -2
- cybrid_api_bank/model/deposit_address_list.py +2 -2
- cybrid_api_bank/model/deposit_address_state.py +2 -2
- cybrid_api_bank/model/deposit_bank_account.py +6 -2
- cybrid_api_bank/model/deposit_bank_account_account_details_inner.py +2 -2
- cybrid_api_bank/model/deposit_bank_account_counterparty_address.py +2 -2
- cybrid_api_bank/model/deposit_bank_account_list.py +2 -2
- cybrid_api_bank/model/deposit_bank_account_routing_details_inner.py +2 -2
- cybrid_api_bank/model/deposit_bank_account_routing_number_type.py +2 -2
- cybrid_api_bank/model/deposit_bank_account_state.py +2 -2
- cybrid_api_bank/model/error_response.py +2 -2
- cybrid_api_bank/model/execution.py +370 -0
- cybrid_api_bank/model/execution_travel_rule_info.py +290 -0
- cybrid_api_bank/model/external_bank_account.py +11 -3
- cybrid_api_bank/model/external_bank_account_balances.py +2 -2
- cybrid_api_bank/model/external_bank_account_kind.py +2 -2
- cybrid_api_bank/model/external_bank_account_list.py +2 -2
- cybrid_api_bank/model/external_bank_account_pii_inner.py +2 -2
- cybrid_api_bank/model/external_bank_account_pii_inner_addresses_inner.py +2 -2
- cybrid_api_bank/model/external_bank_account_pii_inner_routing_details_inner.py +2 -2
- cybrid_api_bank/model/external_bank_account_state.py +2 -2
- cybrid_api_bank/model/external_wallet.py +12 -4
- cybrid_api_bank/model/external_wallet_environment.py +2 -2
- cybrid_api_bank/model/external_wallet_list.py +2 -2
- cybrid_api_bank/model/external_wallet_state.py +2 -2
- cybrid_api_bank/model/fee_association.py +286 -0
- cybrid_api_bank/model/identification_number.py +4 -4
- cybrid_api_bank/model/identity_verification.py +10 -4
- cybrid_api_bank/model/identity_verification_business_associate.py +288 -0
- cybrid_api_bank/model/identity_verification_document.py +290 -0
- cybrid_api_bank/model/identity_verification_document_file.py +280 -0
- cybrid_api_bank/model/identity_verification_list.py +2 -2
- cybrid_api_bank/model/identity_verification_method.py +7 -6
- cybrid_api_bank/model/identity_verification_options.py +264 -0
- cybrid_api_bank/model/identity_verification_outcome.py +2 -2
- cybrid_api_bank/model/identity_verification_persona_state.py +2 -2
- cybrid_api_bank/model/identity_verification_state.py +2 -2
- cybrid_api_bank/model/identity_verification_type.py +2 -2
- cybrid_api_bank/model/identity_verification_with_details.py +26 -4
- cybrid_api_bank/model/identity_verification_with_details_pii.py +26 -2
- cybrid_api_bank/model/identity_verification_with_details_pii_address.py +2 -2
- cybrid_api_bank/model/{post_external_bank_account_counterparty_bank_account.py → identity_verification_with_details_pii_aliases_inner.py} +10 -23
- cybrid_api_bank/model/identity_verification_with_details_pii_name.py +2 -2
- cybrid_api_bank/model/invoice.py +3 -3
- cybrid_api_bank/model/invoice_list.py +2 -2
- cybrid_api_bank/model/list_request_page.py +2 -2
- cybrid_api_bank/model/list_request_per_page.py +2 -2
- cybrid_api_bank/model/patch_bank.py +2 -2
- cybrid_api_bank/model/patch_customer.py +2 -2
- cybrid_api_bank/model/patch_external_bank_account.py +2 -2
- cybrid_api_bank/model/patch_transfer.py +282 -0
- cybrid_api_bank/model/patch_transfer_participant.py +291 -0
- cybrid_api_bank/model/payment_instruction.py +2 -2
- cybrid_api_bank/model/payment_instruction_list.py +2 -2
- cybrid_api_bank/model/persona_session.py +282 -0
- cybrid_api_bank/model/plan.py +366 -0
- cybrid_api_bank/model/plan_travel_rule_info.py +290 -0
- cybrid_api_bank/model/platform_file.py +52 -32
- cybrid_api_bank/model/platform_file_list.py +2 -2
- cybrid_api_bank/model/post_account.py +3 -3
- cybrid_api_bank/model/post_bank.py +2 -2
- cybrid_api_bank/model/post_bank_account_details.py +321 -0
- cybrid_api_bank/model/post_counterparty.py +2 -2
- cybrid_api_bank/model/post_counterparty_address.py +2 -2
- cybrid_api_bank/model/post_counterparty_aliases_inner.py +2 -2
- cybrid_api_bank/model/post_counterparty_name.py +2 -2
- cybrid_api_bank/model/post_customer.py +2 -2
- cybrid_api_bank/model/post_customer_address.py +2 -2
- cybrid_api_bank/model/post_customer_aliases_inner.py +2 -2
- cybrid_api_bank/model/post_customer_name.py +2 -2
- cybrid_api_bank/model/post_deposit_address.py +2 -2
- cybrid_api_bank/model/post_deposit_bank_account.py +2 -2
- cybrid_api_bank/model/post_execution.py +274 -0
- cybrid_api_bank/model/post_external_bank_account.py +8 -8
- cybrid_api_bank/model/post_external_bank_account_counterparty_address.py +2 -2
- cybrid_api_bank/model/post_external_bank_account_counterparty_name.py +2 -2
- cybrid_api_bank/model/post_external_wallet.py +15 -4
- cybrid_api_bank/model/post_fee.py +2 -2
- cybrid_api_bank/model/post_file.py +8 -2
- cybrid_api_bank/model/post_identification_number.py +3 -2
- cybrid_api_bank/model/post_identity_verification.py +9 -4
- cybrid_api_bank/model/post_identity_verification_address.py +2 -2
- cybrid_api_bank/model/post_identity_verification_aliases_inner.py +2 -2
- cybrid_api_bank/model/post_identity_verification_name.py +2 -2
- cybrid_api_bank/model/post_invoice.py +3 -3
- cybrid_api_bank/model/post_payment_instruction.py +2 -2
- cybrid_api_bank/model/post_persona_session.py +276 -0
- cybrid_api_bank/model/post_plan.py +317 -0
- cybrid_api_bank/model/post_plan_destination_account.py +278 -0
- cybrid_api_bank/model/post_plan_source_account.py +278 -0
- cybrid_api_bank/model/post_plan_travel_rule_info.py +276 -0
- cybrid_api_bank/model/post_quote.py +7 -8
- cybrid_api_bank/model/post_quote_entry.py +2 -2
- cybrid_api_bank/model/post_supported_payout_symbols.py +2 -2
- cybrid_api_bank/model/post_trade.py +2 -3
- cybrid_api_bank/model/post_transfer.py +2 -2
- cybrid_api_bank/model/post_transfer_participant.py +2 -2
- cybrid_api_bank/model/post_ultimate_beneficial_owner.py +2 -2
- cybrid_api_bank/model/post_workflow.py +4 -4
- cybrid_api_bank/model/quote.py +5 -5
- cybrid_api_bank/model/quote_entry.py +2 -2
- cybrid_api_bank/model/quote_entry_destination_account.py +2 -2
- cybrid_api_bank/model/quote_entry_source_account.py +2 -2
- cybrid_api_bank/model/quote_list.py +2 -2
- cybrid_api_bank/model/quote_side.py +2 -2
- cybrid_api_bank/model/quote_type.py +2 -2
- cybrid_api_bank/model/stage.py +328 -0
- cybrid_api_bank/model/symbol_price.py +3 -3
- cybrid_api_bank/model/symbol_price_response.py +2 -2
- cybrid_api_bank/model/symbols.py +2 -2
- cybrid_api_bank/model/trade.py +6 -6
- cybrid_api_bank/model/trade_failure_code.py +7 -6
- cybrid_api_bank/model/trade_list.py +2 -2
- cybrid_api_bank/model/trade_side.py +2 -2
- cybrid_api_bank/model/trade_state.py +7 -6
- cybrid_api_bank/model/trade_type.py +2 -2
- cybrid_api_bank/model/transfer.py +37 -9
- cybrid_api_bank/model/transfer_account_type.py +2 -2
- cybrid_api_bank/model/transfer_destination_account.py +2 -2
- cybrid_api_bank/model/transfer_entry.py +2 -2
- cybrid_api_bank/model/transfer_entry_destination_account.py +2 -2
- cybrid_api_bank/model/transfer_failure_code.py +9 -6
- cybrid_api_bank/model/transfer_hold_details.py +272 -0
- cybrid_api_bank/model/transfer_identifiers_inner.py +273 -0
- cybrid_api_bank/model/transfer_list.py +2 -2
- cybrid_api_bank/model/transfer_participant.py +2 -2
- cybrid_api_bank/model/transfer_side.py +2 -2
- cybrid_api_bank/model/transfer_source_account.py +2 -2
- cybrid_api_bank/model/transfer_state.py +7 -6
- cybrid_api_bank/model/transfer_type.py +2 -2
- cybrid_api_bank/model/travel_rule_info_party.py +280 -0
- cybrid_api_bank/model/workflow.py +2 -2
- cybrid_api_bank/model/workflow_state.py +2 -2
- cybrid_api_bank/model/workflow_type.py +2 -2
- cybrid_api_bank/model/workflow_with_details.py +2 -2
- cybrid_api_bank/model/workflow_with_details_all_of.py +2 -2
- cybrid_api_bank/model/workflows_list.py +2 -2
- cybrid_api_bank/model_utils.py +2 -2
- cybrid_api_bank/models/__init__.py +26 -1
- cybrid_api_bank/rest.py +2 -2
- {cybrid_api_bank_python-0.123.287.dist-info → cybrid_api_bank_python-0.125.156.dist-info}/METADATA +2 -2
- cybrid_api_bank_python-0.125.156.dist-info/RECORD +210 -0
- {cybrid_api_bank_python-0.123.287.dist-info → cybrid_api_bank_python-0.125.156.dist-info}/WHEEL +1 -1
- cybrid_api_bank_python-0.123.287.dist-info/RECORD +0 -182
- {cybrid_api_bank_python-0.123.287.dist-info → cybrid_api_bank_python-0.125.156.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Cybrid Bank API
|
|
3
|
+
|
|
4
|
+
# Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you'll find details on how our REST API operates and generally how our platform functions. If you're looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid's public interactive API documentation, which allows you to fully test our APIs. If you'd like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you're new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you'll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d '{ \"grant_type\": \"client_credentials\", \"client_id\": \"<Your Client ID>\", \"client_secret\": \"<Your Secret>\", \"scope\": \"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:pii:read counterparties:write counterparties:execute customers:read customers:pii:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read transfers:write external_bank_accounts:read external_bank_accounts:pii:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:pii:read identity_verifications:write identity_verifications:execute persona_sessions:execute plans:execute plans:read executions:execute executions:read files:read files:pii:read files:execute\" }' -H \"Content-Type: application/json\" # When using Organization credentials set `scope` to 'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:write users:execute counterparties:read counterparties:pii:read customers:read customers:pii:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:write transfers:execute external_bank_accounts:read external_bank_accounts:pii:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read identity_verifications:pii:read identity_verifications:execute persona_sessions:execute plans:execute plans:read executions:execute executions:read files:read files:pii:read files:execute' ``` <font color=\"orange\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you'd like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC'd) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v0.125.156
|
|
7
|
+
Contact: support@cybrid.app
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
import re # noqa: F401
|
|
13
|
+
import sys # noqa: F401
|
|
14
|
+
|
|
15
|
+
from cybrid_api_bank.api_client import ApiClient, Endpoint as _Endpoint
|
|
16
|
+
from cybrid_api_bank.model_utils import ( # noqa: F401
|
|
17
|
+
check_allowed_values,
|
|
18
|
+
check_validations,
|
|
19
|
+
date,
|
|
20
|
+
datetime,
|
|
21
|
+
file_type,
|
|
22
|
+
none_type,
|
|
23
|
+
validate_and_convert_types
|
|
24
|
+
)
|
|
25
|
+
from cybrid_api_bank.model.error_response import ErrorResponse
|
|
26
|
+
from cybrid_api_bank.model.execution import Execution
|
|
27
|
+
from cybrid_api_bank.model.post_execution import PostExecution
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class ExecutionsBankApi(object):
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None):
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
self.create_execution_endpoint = _Endpoint(
|
|
42
|
+
settings={
|
|
43
|
+
'response_type': (Execution,),
|
|
44
|
+
'auth': [
|
|
45
|
+
'BearerAuth',
|
|
46
|
+
'oauth2'
|
|
47
|
+
],
|
|
48
|
+
'endpoint_path': '/api/executions',
|
|
49
|
+
'operation_id': 'create_execution',
|
|
50
|
+
'http_method': 'POST',
|
|
51
|
+
'servers': None,
|
|
52
|
+
},
|
|
53
|
+
params_map={
|
|
54
|
+
'all': [
|
|
55
|
+
'post_execution',
|
|
56
|
+
],
|
|
57
|
+
'required': [
|
|
58
|
+
'post_execution',
|
|
59
|
+
],
|
|
60
|
+
'nullable': [
|
|
61
|
+
],
|
|
62
|
+
'enum': [
|
|
63
|
+
],
|
|
64
|
+
'validation': [
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
root_map={
|
|
68
|
+
'validations': {
|
|
69
|
+
},
|
|
70
|
+
'allowed_values': {
|
|
71
|
+
},
|
|
72
|
+
'openapi_types': {
|
|
73
|
+
'post_execution':
|
|
74
|
+
(PostExecution,),
|
|
75
|
+
},
|
|
76
|
+
'attribute_map': {
|
|
77
|
+
},
|
|
78
|
+
'location_map': {
|
|
79
|
+
'post_execution': 'body',
|
|
80
|
+
},
|
|
81
|
+
'collection_format_map': {
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
headers_map={
|
|
85
|
+
'accept': [
|
|
86
|
+
'application/json'
|
|
87
|
+
],
|
|
88
|
+
'content_type': [
|
|
89
|
+
'application/json'
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
api_client=api_client
|
|
93
|
+
)
|
|
94
|
+
self.get_execution_endpoint = _Endpoint(
|
|
95
|
+
settings={
|
|
96
|
+
'response_type': (Execution,),
|
|
97
|
+
'auth': [
|
|
98
|
+
'BearerAuth',
|
|
99
|
+
'oauth2'
|
|
100
|
+
],
|
|
101
|
+
'endpoint_path': '/api/executions/{execution_guid}',
|
|
102
|
+
'operation_id': 'get_execution',
|
|
103
|
+
'http_method': 'GET',
|
|
104
|
+
'servers': None,
|
|
105
|
+
},
|
|
106
|
+
params_map={
|
|
107
|
+
'all': [
|
|
108
|
+
'execution_guid',
|
|
109
|
+
],
|
|
110
|
+
'required': [
|
|
111
|
+
'execution_guid',
|
|
112
|
+
],
|
|
113
|
+
'nullable': [
|
|
114
|
+
],
|
|
115
|
+
'enum': [
|
|
116
|
+
],
|
|
117
|
+
'validation': [
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
root_map={
|
|
121
|
+
'validations': {
|
|
122
|
+
},
|
|
123
|
+
'allowed_values': {
|
|
124
|
+
},
|
|
125
|
+
'openapi_types': {
|
|
126
|
+
'execution_guid':
|
|
127
|
+
(str,),
|
|
128
|
+
},
|
|
129
|
+
'attribute_map': {
|
|
130
|
+
'execution_guid': 'execution_guid',
|
|
131
|
+
},
|
|
132
|
+
'location_map': {
|
|
133
|
+
'execution_guid': 'path',
|
|
134
|
+
},
|
|
135
|
+
'collection_format_map': {
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
headers_map={
|
|
139
|
+
'accept': [
|
|
140
|
+
'application/json'
|
|
141
|
+
],
|
|
142
|
+
'content_type': [],
|
|
143
|
+
},
|
|
144
|
+
api_client=api_client
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
def create_execution(
|
|
148
|
+
self,
|
|
149
|
+
post_execution,
|
|
150
|
+
**kwargs
|
|
151
|
+
):
|
|
152
|
+
"""Create Execution # noqa: E501
|
|
153
|
+
|
|
154
|
+
Creates an execution. ## Create a plan execution | State | Description | |-------|-------------| | storing | The Platform is storing the execution details in our private store | | executing | The Platform is executing the plan | | completed | The Platform has successfully completed the plan execution | | failed | The Platform was not able to successfully complete the plan execution | Required scope: **executions:execute** # noqa: E501
|
|
155
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
156
|
+
asynchronous HTTP request, please pass async_req=True
|
|
157
|
+
|
|
158
|
+
>>> thread = api.create_execution(post_execution, async_req=True)
|
|
159
|
+
>>> result = thread.get()
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
post_execution (PostExecution):
|
|
163
|
+
|
|
164
|
+
Keyword Args:
|
|
165
|
+
_return_http_data_only (bool): response data without head status
|
|
166
|
+
code and headers. Default is True.
|
|
167
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
168
|
+
will be returned without reading/decoding response data.
|
|
169
|
+
Default is True.
|
|
170
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
171
|
+
one number provided, it will be total request timeout. It can also
|
|
172
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
173
|
+
Default is None.
|
|
174
|
+
_check_input_type (bool): specifies if type checking
|
|
175
|
+
should be done one the data sent to the server.
|
|
176
|
+
Default is True.
|
|
177
|
+
_check_return_type (bool): specifies if type checking
|
|
178
|
+
should be done one the data received from the server.
|
|
179
|
+
Default is True.
|
|
180
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
181
|
+
are serialized names, as specified in the OpenAPI document.
|
|
182
|
+
False if the variable names in the input data
|
|
183
|
+
are pythonic names, e.g. snake case (default)
|
|
184
|
+
_content_type (str/None): force body content-type.
|
|
185
|
+
Default is None and content-type will be predicted by allowed
|
|
186
|
+
content-types and body.
|
|
187
|
+
_host_index (int/None): specifies the index of the server
|
|
188
|
+
that we want to use.
|
|
189
|
+
Default is read from the configuration.
|
|
190
|
+
_request_auths (list): set to override the auth_settings for an a single
|
|
191
|
+
request; this effectively ignores the authentication
|
|
192
|
+
in the spec for a single request.
|
|
193
|
+
Default is None
|
|
194
|
+
async_req (bool): execute request asynchronously
|
|
195
|
+
|
|
196
|
+
Returns:
|
|
197
|
+
Execution
|
|
198
|
+
If the method is called asynchronously, returns the request
|
|
199
|
+
thread.
|
|
200
|
+
"""
|
|
201
|
+
kwargs['async_req'] = kwargs.get(
|
|
202
|
+
'async_req', False
|
|
203
|
+
)
|
|
204
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
205
|
+
'_return_http_data_only', True
|
|
206
|
+
)
|
|
207
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
208
|
+
'_preload_content', True
|
|
209
|
+
)
|
|
210
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
211
|
+
'_request_timeout', None
|
|
212
|
+
)
|
|
213
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
214
|
+
'_check_input_type', True
|
|
215
|
+
)
|
|
216
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
217
|
+
'_check_return_type', True
|
|
218
|
+
)
|
|
219
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
220
|
+
'_spec_property_naming', False
|
|
221
|
+
)
|
|
222
|
+
kwargs['_content_type'] = kwargs.get(
|
|
223
|
+
'_content_type')
|
|
224
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
225
|
+
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
226
|
+
kwargs['post_execution'] = \
|
|
227
|
+
post_execution
|
|
228
|
+
return self.create_execution_endpoint.call_with_http_info(**kwargs)
|
|
229
|
+
|
|
230
|
+
def get_execution(
|
|
231
|
+
self,
|
|
232
|
+
execution_guid,
|
|
233
|
+
**kwargs
|
|
234
|
+
):
|
|
235
|
+
"""Get Execution # noqa: E501
|
|
236
|
+
|
|
237
|
+
Retrieves a execution. Required scope: **executions:read** # noqa: E501
|
|
238
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
239
|
+
asynchronous HTTP request, please pass async_req=True
|
|
240
|
+
|
|
241
|
+
>>> thread = api.get_execution(execution_guid, async_req=True)
|
|
242
|
+
>>> result = thread.get()
|
|
243
|
+
|
|
244
|
+
Args:
|
|
245
|
+
execution_guid (str): Identifier for the payment instruction.
|
|
246
|
+
|
|
247
|
+
Keyword Args:
|
|
248
|
+
_return_http_data_only (bool): response data without head status
|
|
249
|
+
code and headers. Default is True.
|
|
250
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
251
|
+
will be returned without reading/decoding response data.
|
|
252
|
+
Default is True.
|
|
253
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
254
|
+
one number provided, it will be total request timeout. It can also
|
|
255
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
256
|
+
Default is None.
|
|
257
|
+
_check_input_type (bool): specifies if type checking
|
|
258
|
+
should be done one the data sent to the server.
|
|
259
|
+
Default is True.
|
|
260
|
+
_check_return_type (bool): specifies if type checking
|
|
261
|
+
should be done one the data received from the server.
|
|
262
|
+
Default is True.
|
|
263
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
264
|
+
are serialized names, as specified in the OpenAPI document.
|
|
265
|
+
False if the variable names in the input data
|
|
266
|
+
are pythonic names, e.g. snake case (default)
|
|
267
|
+
_content_type (str/None): force body content-type.
|
|
268
|
+
Default is None and content-type will be predicted by allowed
|
|
269
|
+
content-types and body.
|
|
270
|
+
_host_index (int/None): specifies the index of the server
|
|
271
|
+
that we want to use.
|
|
272
|
+
Default is read from the configuration.
|
|
273
|
+
_request_auths (list): set to override the auth_settings for an a single
|
|
274
|
+
request; this effectively ignores the authentication
|
|
275
|
+
in the spec for a single request.
|
|
276
|
+
Default is None
|
|
277
|
+
async_req (bool): execute request asynchronously
|
|
278
|
+
|
|
279
|
+
Returns:
|
|
280
|
+
Execution
|
|
281
|
+
If the method is called asynchronously, returns the request
|
|
282
|
+
thread.
|
|
283
|
+
"""
|
|
284
|
+
kwargs['async_req'] = kwargs.get(
|
|
285
|
+
'async_req', False
|
|
286
|
+
)
|
|
287
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
288
|
+
'_return_http_data_only', True
|
|
289
|
+
)
|
|
290
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
291
|
+
'_preload_content', True
|
|
292
|
+
)
|
|
293
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
294
|
+
'_request_timeout', None
|
|
295
|
+
)
|
|
296
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
297
|
+
'_check_input_type', True
|
|
298
|
+
)
|
|
299
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
300
|
+
'_check_return_type', True
|
|
301
|
+
)
|
|
302
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
303
|
+
'_spec_property_naming', False
|
|
304
|
+
)
|
|
305
|
+
kwargs['_content_type'] = kwargs.get(
|
|
306
|
+
'_content_type')
|
|
307
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
308
|
+
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
309
|
+
kwargs['execution_guid'] = \
|
|
310
|
+
execution_guid
|
|
311
|
+
return self.get_execution_endpoint.call_with_http_info(**kwargs)
|
|
312
|
+
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Cybrid Bank API
|
|
3
3
|
|
|
4
|
-
# Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you'll find details on how our REST API operates and generally how our platform functions. If you're looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid's public interactive API documentation, which allows you to fully test our APIs. If you'd like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you're new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you'll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d '{ \"grant_type\": \"client_credentials\", \"client_id\": \"<Your Client ID>\", \"client_secret\": \"<Your Secret>\", \"scope\": \"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute files:read files:execute\" }' -H \"Content-Type: application/json\" # When using Organization credentials set `scope` to 'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read files:read files:execute' ``` <font color=\"orange\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you'd like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC'd) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. # noqa: E501
|
|
4
|
+
# Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you'll find details on how our REST API operates and generally how our platform functions. If you're looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid's public interactive API documentation, which allows you to fully test our APIs. If you'd like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you're new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you'll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\"orange\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d '{ \"grant_type\": \"client_credentials\", \"client_id\": \"<Your Client ID>\", \"client_secret\": \"<Your Secret>\", \"scope\": \"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:pii:read counterparties:write counterparties:execute customers:read customers:pii:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read transfers:write external_bank_accounts:read external_bank_accounts:pii:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:pii:read identity_verifications:write identity_verifications:execute persona_sessions:execute plans:execute plans:read executions:execute executions:read files:read files:pii:read files:execute\" }' -H \"Content-Type: application/json\" # When using Organization credentials set `scope` to 'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:write users:execute counterparties:read counterparties:pii:read customers:read customers:pii:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:write transfers:execute external_bank_accounts:read external_bank_accounts:pii:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read identity_verifications:pii:read identity_verifications:execute persona_sessions:execute plans:execute plans:read executions:execute executions:read files:read files:pii:read files:execute' ``` <font color=\"orange\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you'd like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC'd) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. # noqa: E501
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: v0.
|
|
6
|
+
The version of the OpenAPI document: v0.125.156
|
|
7
7
|
Contact: support@cybrid.app
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
"""
|
|
@@ -231,6 +231,7 @@ class ExternalBankAccountsBankApi(object):
|
|
|
231
231
|
'guid',
|
|
232
232
|
'bank_guid',
|
|
233
233
|
'customer_guid',
|
|
234
|
+
'counterparty_guid',
|
|
234
235
|
'asset',
|
|
235
236
|
'state',
|
|
236
237
|
],
|
|
@@ -269,6 +270,8 @@ class ExternalBankAccountsBankApi(object):
|
|
|
269
270
|
(str,),
|
|
270
271
|
'customer_guid':
|
|
271
272
|
(str,),
|
|
273
|
+
'counterparty_guid':
|
|
274
|
+
(str,),
|
|
272
275
|
'asset':
|
|
273
276
|
(str,),
|
|
274
277
|
'state':
|
|
@@ -280,6 +283,7 @@ class ExternalBankAccountsBankApi(object):
|
|
|
280
283
|
'guid': 'guid',
|
|
281
284
|
'bank_guid': 'bank_guid',
|
|
282
285
|
'customer_guid': 'customer_guid',
|
|
286
|
+
'counterparty_guid': 'counterparty_guid',
|
|
283
287
|
'asset': 'asset',
|
|
284
288
|
'state': 'state',
|
|
285
289
|
},
|
|
@@ -289,6 +293,7 @@ class ExternalBankAccountsBankApi(object):
|
|
|
289
293
|
'guid': 'query',
|
|
290
294
|
'bank_guid': 'query',
|
|
291
295
|
'customer_guid': 'query',
|
|
296
|
+
'counterparty_guid': 'query',
|
|
292
297
|
'asset': 'query',
|
|
293
298
|
'state': 'query',
|
|
294
299
|
},
|
|
@@ -536,7 +541,7 @@ class ExternalBankAccountsBankApi(object):
|
|
|
536
541
|
):
|
|
537
542
|
"""Get External Bank Account # noqa: E501
|
|
538
543
|
|
|
539
|
-
Retrieves an external bank account. ## ExternalBankAccount retrieval When retrieving an external bank account and include_balances is set to true, the Platform will attempt to retrieve the balance from the account's financial institution. If force_balance_refresh is set to true, the Platform will always attempt to retrieve the most up to date balance from the account's financial institution. If force_balance_refresh is set to false, the Platform will return the cached balance. If while getting the balance the Platform determines that the account needs to be refreshed, the Platform will return a 422 status code with the message \"Bank account refresh required\" and the ExternalBankAccount will be put into the refresh_required state. If while getting the balance the Platform determines that the account is no longer valid, the Platform will return a 422 status code with the message \"Bank account can no longer be used and is being deleted. It must be re-added\" and the ExternalBankAccount will be deleted. When retrieving an external bank account and include_pii is set to true, the Platform will include the account holder's information in the response. Required scope: **external_bank_accounts:read** # noqa: E501
|
|
544
|
+
Retrieves an external bank account. ## ExternalBankAccount retrieval When retrieving an external bank account and include_balances is set to true, the Platform will attempt to retrieve the balance from the account's financial institution. If force_balance_refresh is set to true, the Platform will always attempt to retrieve the most up to date balance from the account's financial institution. If force_balance_refresh is set to false, the Platform will return the cached balance. If while getting the balance the Platform determines that the account needs to be refreshed, the Platform will return a 422 status code with the message \"Bank account refresh required\" and the ExternalBankAccount will be put into the refresh_required state. If while getting the balance the Platform determines that the account is no longer valid, the Platform will return a 422 status code with the message \"Bank account can no longer be used and is being deleted. It must be re-added\" and the ExternalBankAccount will be deleted. When retrieving an external bank account and include_pii is set to true, the Platform will include the account holder's information in the response. Required scope: **external_bank_accounts:read** Optional scope: **external_bank_accounts:pii:read**. # noqa: E501
|
|
540
545
|
This method makes a synchronous HTTP request by default. To make an
|
|
541
546
|
asynchronous HTTP request, please pass async_req=True
|
|
542
547
|
|
|
@@ -549,7 +554,7 @@ class ExternalBankAccountsBankApi(object):
|
|
|
549
554
|
Keyword Args:
|
|
550
555
|
force_balance_refresh (bool): Force the balance on the account to be retrieved.. [optional]
|
|
551
556
|
include_balances (bool): Include balance information in the response. If `force_balance_refresh` is `true`, the most up to date balance will be returned. If `force_balance_refresh` is `false`, the cached balance will be returned. `balance_updated_at` in the response will provide the timestamp the balance was last updated.. [optional]
|
|
552
|
-
include_pii (bool): Include the account holder's PII in the response.. [optional]
|
|
557
|
+
include_pii (bool): Include the account holder's PII in the response (requires **external_bank_accounts:pii:read** scope).. [optional]
|
|
553
558
|
_return_http_data_only (bool): response data without head status
|
|
554
559
|
code and headers. Default is True.
|
|
555
560
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
@@ -621,7 +626,7 @@ class ExternalBankAccountsBankApi(object):
|
|
|
621
626
|
):
|
|
622
627
|
"""Get external bank accounts list # noqa: E501
|
|
623
628
|
|
|
624
|
-
Retrieves a listing of external bank accounts. Required scope: **external_bank_accounts:read** # noqa: E501
|
|
629
|
+
Retrieves a listing of external bank accounts. Records are sorted by creation date in descending order. Required scope: **external_bank_accounts:read** # noqa: E501
|
|
625
630
|
This method makes a synchronous HTTP request by default. To make an
|
|
626
631
|
asynchronous HTTP request, please pass async_req=True
|
|
627
632
|
|
|
@@ -635,6 +640,7 @@ class ExternalBankAccountsBankApi(object):
|
|
|
635
640
|
guid (str): Comma separated external_bank_account_guids to list external_bank_accounts for.. [optional]
|
|
636
641
|
bank_guid (str): Comma separated bank_guids to list external_bank_accounts for.. [optional]
|
|
637
642
|
customer_guid (str): Comma separated customer_guids to list external_bank_accounts for.. [optional]
|
|
643
|
+
counterparty_guid (str): Comma separated counterparty_guids to list external_bank_accounts for.. [optional]
|
|
638
644
|
asset (str): Comma separated assets to list external_bank_accounts for.. [optional]
|
|
639
645
|
state (str): Comma separated states to list external_bank_accounts for. Filtering by \"completed\" and \"unverified\" states is only supported for individual customer accounts.. [optional]
|
|
640
646
|
_return_http_data_only (bool): response data without head status
|