Cubist RPC API

The RPC API from Cubist — 1 operation(s) for rpc.

OpenAPI Specification

cubist-rpc-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: CubeSigner Account RPC API
  description: The CubeSigner management and signing service.
  contact:
    name: Cubist Inc.
    email: hello@cubist.dev
  version: v0.1.0
servers:
- url: https://gamma.signer.cubist.dev
  description: Testing and staging environment
- url: https://prod.signer.cubist.dev
  description: Production environment
security:
- Cognito: []
tags:
- name: RPC
paths:
  /v0/org/{org_id}/rpc:
    post:
      tags:
      - RPC
      summary: High-level RPC endpoint.
      description: High-level RPC endpoint.
      operationId: rpcApi
      parameters:
      - name: org_id
        in: path
        description: Name or ID of the desired Org
        required: true
        schema:
          type: string
        example: Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequest'
        required: true
      responses:
        '200':
          $ref: '#/components/responses/JsonRpcResponse'
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - SignerAuth:
        - rpc:*
components:
  schemas:
    BybitWithdrawalsParams:
      allOf:
      - $ref: '#/components/schemas/BybitWithdrawalsRequest'
      - type: object
        required:
        - keyId
        properties:
          dryRun:
            allOf:
            - $ref: '#/components/schemas/BybitDryRunMode'
            nullable: true
          keyId:
            $ref: '#/components/schemas/Id'
          recvWindow:
            type: integer
            format: int32
            description: 'Optional "receive window", i.e., for how long the request stays valid.

              Specified in milliseconds. If omitted, defaults to 10000.'
            nullable: true
            minimum: 0
      description: 'Parameters envelope for all Bybit RPC variants whose payload schema is

        derived from a `*Request` struct. (`BybitQueryUserParams` and

        `BybitQuerySubMembersParams` have no per-variant payload and are defined

        directly below.)'
    DepositRequest:
      type: object
      description: 'Parameters for `GET /sapi/v1/capital/deposit/address`.


        Fetches the deposit address for `coin` on the account that the signing key

        authenticates as. Optionally narrows the address to a specific `network`.'
      required:
      - coin
      properties:
        amount:
          type: string
          description: 'Required only when `network` is `"LIGHTNING"`: the deposit amount that

            the returned invoice should encode, as a decimal string.'
          nullable: true
        coin:
          type: string
          description: The asset symbol whose deposit address to fetch (e.g. `"USDT"`, `"BTC"`).
        network:
          type: string
          description: 'Network identifier (e.g. `"BSC"`, `"ETH"`). If omitted, Binance returns

            the address on the asset''s default network.'
          nullable: true
    BybitQueryDepositAddressParams:
      allOf:
      - $ref: '#/components/schemas/BybitQueryDepositAddressRequest'
      - type: object
        required:
        - keyId
        properties:
          dryRun:
            allOf:
            - $ref: '#/components/schemas/BybitDryRunMode'
            nullable: true
          keyId:
            $ref: '#/components/schemas/Id'
          recvWindow:
            type: integer
            format: int32
            description: 'Optional "receive window", i.e., for how long the request stays valid.

              Specified in milliseconds. If omitted, defaults to 10000.'
            nullable: true
            minimum: 0
      description: 'Parameters envelope for all Bybit RPC variants whose payload schema is

        derived from a `*Request` struct. (`BybitQueryUserParams` and

        `BybitQuerySubMembersParams` have no per-variant payload and are defined

        directly below.)'
    BinanceAccountInfoParams:
      allOf:
      - $ref: '#/components/schemas/AccountInfoRequest'
      - type: object
        required:
        - keyId
        properties:
          dryRun:
            allOf:
            - $ref: '#/components/schemas/BinanceDryRunMode'
            nullable: true
          keyId:
            $ref: '#/components/schemas/Id'
          recvWindow:
            type: number
            format: float
            description: 'Optional "receive window", i.e., for how long the request stays valid.

              May only be specified in milliseconds, with up to three decimal places of precision.

              If omitted, defaults to 10000. Must not be greater than 60000.'
            nullable: true
      description: Parameters envelope for all Binance RPC methods.
    UniversalTransferRequest:
      type: object
      description: 'Parameters for `POST /sapi/v1/sub-account/universalTransfer`.


        Transfers an asset between any two accounts (master to/from sub, or sub

        to/from sub) and between any two wallet types (spot, futures, margin, etc).

        The signing credential (the API key + Ed25519 key pair) must belong to the

        master account.'
      required:
      - asset
      - amount
      properties:
        amount:
          type: string
          description: The amount being transferred, as a decimal string.
        asset:
          type: string
          description: The asset symbol being transferred (e.g. `"USDT"`).
        clientTranId:
          type: string
          description: 'Optional client-supplied transfer id. If set, Binance echoes it back

            as `client_tran_id` on the `UniversalTransferResponse` and lets it be

            used as a filter on

            [`UniversalTransferHistoryRequest::client_tran_id`].'
          nullable: true
        fromAccountType:
          $ref: '#/components/schemas/AccountType'
        fromEmail:
          type: string
          description: Source sub-account email. If `None`, the source is the master account.
          nullable: true
        toAccountType:
          $ref: '#/components/schemas/AccountType'
        toEmail:
          type: string
          description: Destination sub-account email. If `None`, the destination is the master account.
          nullable: true
    SubAccountAssetsRequest:
      type: object
      description: 'Parameters for `GET /sapi/v4/sub-account/assets`.


        Queries the spot-wallet balances of a single sub-account. Must be called by

        a master-account credential.'
      required:
      - email
      properties:
        email:
          type: string
          description: Email address of the sub-account whose balances to fetch.
    BybitWithdrawParams:
      allOf:
      - $ref: '#/components/schemas/BybitWithdrawRequest'
      - type: object
        required:
        - keyId
        properties:
          dryRun:
            allOf:
            - $ref: '#/components/schemas/BybitDryRunMode'
            nullable: true
          keyId:
            $ref: '#/components/schemas/Id'
          recvWindow:
            type: integer
            format: int32
            description: 'Optional "receive window", i.e., for how long the request stays valid.

              Specified in milliseconds. If omitted, defaults to 10000.'
            nullable: true
            minimum: 0
      description: 'Parameters envelope for all Bybit RPC variants whose payload schema is

        derived from a `*Request` struct. (`BybitQueryUserParams` and

        `BybitQuerySubMembersParams` have no per-variant payload and are defined

        directly below.)'
    BinanceDryRunMode:
      type: string
      description: Different "dry run" modes for executing Binance requests.
      enum:
      - NO_SIGN
      - NO_SUBMIT
    NotFoundErrorCode:
      type: string
      enum:
      - UriSegmentMissing
      - UriSegmentInvalid
      - TotpNotConfigured
      - FidoKeyNotFound
      - FidoChallengeNotFound
      - TotpChallengeNotFound
      - UserExportRequestNotFound
      - UserExportCiphertextNotFound
      - OrgExportCiphertextNotFound
      - UploadObjectNotFound
      - PolicySecretNotFound
      - BucketMetaNotFound
      - TimestreamDisabled
      - CustomChainNotFound
      - InvitationNotFound
      - TransactionNotFound
      - EmailConfigNotFound
    HttpRequestCmp:
      oneOf:
      - type: string
        description: The requests must match exactly. Any given MFA receipt can be used at most once.
        enum:
        - Eq
      - type: object
        required:
        - EvmTx
        properties:
          EvmTx:
            $ref: '#/components/schemas/EvmTxCmp'
      - type: object
        required:
        - SolanaTx
        properties:
          SolanaTx:
            $ref: '#/components/schemas/SolanaTxCmp'
      description: How to compare HTTP requests when verifying MFA receipt (see [MfaRequest::verify_request])
    BinanceSubToMasterParams:
      allOf:
      - $ref: '#/components/schemas/SubToMasterRequest'
      - type: object
        required:
        - keyId
        properties:
          dryRun:
            allOf:
            - $ref: '#/components/schemas/BinanceDryRunMode'
            nullable: true
          keyId:
            $ref: '#/components/schemas/Id'
          recvWindow:
            type: number
            format: float
            description: 'Optional "receive window", i.e., for how long the request stays valid.

              May only be specified in milliseconds, with up to three decimal places of precision.

              If omitted, defaults to 10000. Must not be greater than 60000.'
            nullable: true
      description: Parameters envelope for all Binance RPC methods.
    BadGatewayErrorCode:
      type: string
      enum:
      - Generic
      - CustomChainRpcError
      - EsploraApiError
      - SentryApiError
      - CallWebhookError
      - OAuthProviderError
      - OidcDisoveryFailed
      - OidcIssuerJwkEndpointUnavailable
      - SmtpServerUnavailable
    SignerErrorCode:
      oneOf:
      - $ref: '#/components/schemas/SignerErrorOwnCodes'
      - $ref: '#/components/schemas/AcceptedValueCode'
      - $ref: '#/components/schemas/BadRequestErrorCode'
      - $ref: '#/components/schemas/BadGatewayErrorCode'
      - $ref: '#/components/schemas/NotFoundErrorCode'
      - $ref: '#/components/schemas/ForbiddenErrorCode'
      - $ref: '#/components/schemas/UnauthorizedErrorCode'
      - $ref: '#/components/schemas/PreconditionErrorCode'
      - $ref: '#/components/schemas/TimeoutErrorCode'
      - $ref: '#/components/schemas/ConflictErrorCode'
      - $ref: '#/components/schemas/InternalErrorCode'
    BybitQueryUserParams:
      type: object
      description: 'Parameters for [`BybitRpc::QueryUser`].


        Bybit endpoint: `GET /v5/user/query-api`. Takes no inputs beyond the common

        `recvWindow` / `timestamp` envelope; defined directly (instead of through

        the [`BybitParams`] generic alias) so utoipa emits a non-empty schema.'
      required:
      - keyId
      properties:
        dryRun:
          allOf:
          - $ref: '#/components/schemas/BybitDryRunMode'
          nullable: true
        keyId:
          $ref: '#/components/schemas/Id'
        recvWindow:
          type: integer
          format: int32
          description: Optional receive window in milliseconds. Defaults to 10000.
          nullable: true
          minimum: 0
    BtcNetwork:
      type: string
      description: The Bitcoin network to query for UTXOs.
      enum:
      - mainnet
      - testnet
    SubToSubRequest:
      type: object
      description: 'Parameters for `POST /sapi/v1/sub-account/transfer/subToSub`.


        Transfers an asset from the caller''s sub-account to another sub-account

        under the same master account.'
      required:
      - toEmail
      - asset
      - amount
      properties:
        amount:
          type: string
          description: The amount being transferred, as a decimal string (e.g. `"0.1"`).
        asset:
          type: string
          description: The asset symbol being transferred (e.g. `"USDT"`).
        toEmail:
          type: string
          description: 'Email address of the destination sub-account. Must be a sub-account of

            the same master.'
    ClientSessionInfo:
      type: object
      description: 'Session information sent to the client.

        This struct works in tandem with its server-side counterpart [`SessionData`].'
      required:
      - session_id
      - auth_token
      - refresh_token
      - epoch
      - epoch_token
      - auth_token_exp
      - refresh_token_exp
      properties:
        auth_token:
          type: string
          description: Token to use for authorization.
        auth_token_exp:
          $ref: '#/components/schemas/EpochDateTime'
        epoch:
          type: integer
          format: int32
          description: Epoch at which the token was last refreshed
          minimum: 0
        epoch_token:
          $ref: '#/components/schemas/B32'
        refresh_token:
          type: string
          description: Token to use for refreshing the `(auth, refresh)` token pair
        refresh_token_exp:
          $ref: '#/components/schemas/EpochDateTime'
        session_id:
          type: string
          description: Session ID
    BinanceDryRunArgs:
      type: object
      required:
      - method
      - url
      properties:
        method:
          type: string
          description: The Binance API method that would have been used
        url:
          type: string
          description: The Binance API url method that would have been called
    CoinbaseRpc:
      oneOf:
      - type: object
        description: List the brokerage accounts the calling key can see.
        required:
        - params
        - method
        properties:
          method:
            type: string
            enum:
            - cs_coinbaseListAccounts
          params:
            $ref: '#/components/schemas/CoinbaseListAccountsParams'
      - type: object
        description: List the portfolios the calling key can see.
        required:
        - params
        - method
        properties:
          method:
            type: string
            enum:
            - cs_coinbaseListPortfolios
          params:
            $ref: '#/components/schemas/CoinbaseListPortfoliosParams'
      - type: object
        description: Move funds between two portfolios on the calling key's account.
        required:
        - params
        - method
        properties:
          method:
            type: string
            enum:
            - cs_coinbaseMoveFunds
          params:
            $ref: '#/components/schemas/CoinbaseMoveFundsParams'
      description: 'Coinbase-family RPC methods. Each variant authenticates as the

        [`KeyType::Ed25519CoinbaseApi`] key in its `params.key_id`.'
    BinanceWithdrawParams:
      allOf:
      - $ref: '#/components/schemas/WithdrawRequest'
      - type: object
        required:
        - keyId
        properties:
          dryRun:
            allOf:
            - $ref: '#/components/schemas/BinanceDryRunMode'
            nullable: true
          keyId:
            $ref: '#/components/schemas/Id'
          recvWindow:
            type: number
            format: float
            description: 'Optional "receive window", i.e., for how long the request stays valid.

              May only be specified in milliseconds, with up to three decimal places of precision.

              If omitted, defaults to 10000. Must not be greater than 60000.'
            nullable: true
      description: Parameters envelope for all Binance RPC methods.
    RpcMethod:
      oneOf:
      - $ref: '#/components/schemas/CsRpc'
      - $ref: '#/components/schemas/BinanceRpc'
      - $ref: '#/components/schemas/BybitRpc'
      - $ref: '#/components/schemas/CoinbaseRpc'
      description: 'The RPC API method and matching parameters.


        Top-level dispatch. Wire format is preserved by `#[serde(untagged)]`: each

        inbound request is matched against one of the internally-tagged inner enums

        ([`CsRpc`] for the core methods, [`BinanceRpc`] for the Binance family,

        [`BybitRpc`] for the Bybit family, [`CoinbaseRpc`] for the Coinbase family).'
    CoinbaseDryRunMode:
      type: string
      description: Different "dry run" modes for executing Coinbase requests.
      enum:
      - NO_SIGN
      - NO_SUBMIT
    SignerErrorOwnCodes:
      type: string
      enum:
      - PreComputed
      - StatusCodeWithMessage
      - JrpcError
      - UnhandledError
      - ProxyStartError
      - EnclaveError
      - PolicyErrorWithEvalTree
      - RpcApi
    GetTransactionRequest:
      type: object
      description: Parameters for the [`cs_getTransaction`](RpcMethod::GetTransaction) method.
      required:
      - id
      properties:
        id:
          $ref: '#/components/schemas/Id'
    CreateEvmTransactionRequest:
      oneOf:
      - allOf:
        - $ref: '#/components/schemas/CreateEvmTransferRequest'
        - type: object
          required:
          - type
          properties:
            type:
              type: string
              enum:
              - Transfer
      description: Parameters for creating an EVM transaction.
      discriminator:
        propertyName: type
    Page:
      type: object
      description: 'The rocket query parameter representing the page from which to start a paginated query.


        MUST be named `<page>` in rocket url spec so that ''serde(rename = "page.*")'' below continues to work'
      properties:
        page.size:
          type: integer
          format: int32
          description: 'Max number of items to return per page.


            If the actual number of returned items may be less that this, even if there exist more

            data in the result set. To reliably determine if more data is left in the result set,

            inspect the [UnencryptedLastEvalKey] value in the response object.'
          minimum: 0
        page.start:
          type: string
          description: 'The start of the page.  Omit to start from the beginning; otherwise, only specify a

            the exact value previously returned as ''last_evaluated_key'' from the same endpoint.'
          nullable: true
    AccountInfoRequest:
      type: object
      description: 'Parameters for `GET /api/v3/account`.


        Returns Spot account info for whichever account the signing key

        authenticates as (master or sub).'
      properties:
        omitZeroBalances:
          type: boolean
          description: 'If `true`, the response omits assets with all-zero balances. Defaults to

            `false` (Binance''s default).'
          nullable: true
    Status:
      type: object
      required:
      - count
      - num_auth_factors
      - allowed_approvers
      - approved_by
      properties:
        allowed_approvers:
          type: array
          items:
            type: string
          description: Users who are allowed to approve. Must be non-empty.
        allowed_mfa_types:
          type: array
          items:
            $ref: '#/components/schemas/MfaType'
          description: Allowed approval types. When omitted, defaults to any.
          nullable: true
        approved_by:
          type: object
          description: Users who have already approved
          additionalProperties:
            type: object
            additionalProperties:
              $ref: '#/components/schemas/ApprovalInfo'
        count:
          type: integer
          format: int32
          description: How many users must approve
          minimum: 0
        num_auth_factors:
          type: integer
          format: int32
          description: How many auth factors to require per user
          minimum: 0
        request_comparer:
          $ref: '#/components/schemas/HttpRequestCmp'
    CancelTransactionRequest:
      type: object
      description: Parameters for the [`cs_cancelTransaction`](RpcMethod::CancelTransaction) method.
      required:
      - id
      properties:
        id:
          type: string
          description: The transaction id.
    DepositHistoryRequest:
      type: object
      description: 'Parameters for `GET /sapi/v1/capital/deposit/hisrec`.


        Returns the calling account''s deposit history. All filters are optional;

        if `start_time`/`end_time` are omitted, Binance returns the most recent 90

        days. Use `tx_id` to look up a specific deposit by its on-chain

        transaction hash, or `coin`/`status` to narrow the result set.'
      properties:
        coin:
          type: string
          description: Filter to a specific asset (e.g. `"USDT"`, `"BTC"`).
          nullable: true
        endTime:
          type: integer
          format: int64
          description: 'Window end (ms since epoch, Binance default: present timestamp).'
          nullable: true
          minimum: 0
        includeSource:
          type: boolean
          description: 'If `true`, include the deposit''s source address in each entry. Binance

            defaults to `false`.'
          nullable: true
        limit:
          type: integer
          format: int32
          description: 'Page size (Binance default and max: 1000).'
          nullable: true
          minimum: 0
        offset:
          type: integer
          format: int32
          description: 'Pagination offset (Binance default: 0).'
          nullable: true
          minimum: 0
        startTime:
          type: integer
          format: int64
          description: 'Window start (ms since epoch, Binance default: 90 days from current timestamp).'
          nullable: true
          minimum: 0
        status:
          type: integer
          format: int32
          description: 'Filter by deposit status. Binance values: `0` = pending, `6` = credited

            but cannot withdraw, `7` = wrong deposit, `8` = waiting user confirm,

            `1` = success, `2` = rejected. Left as `u8` for forward compatibility.'
          nullable: true
          minimum: 0
        txId:
          type: string
          description: Look up a specific deposit by its on-chain transaction hash.
          nullable: true
    MfaRequiredArgs:
      type: object
      required:
      - id
      - ids
      - org_id
      properties:
        id:
          type: string
          description: Always set to first MFA id from `Self::ids`
        ids:
          type: array
          items:
            type: string
            minLength: 1
          description: Non-empty MFA request IDs
        org_id:
          type: string
          description: Organization id
        policy_eval_tree:
          description: Optional policy evaluation tree (included in signer responses, when requested)
          nullable: true
        session:
          allOf:
          - $ref: '#/components/schemas/NewSessionResponse'
          nullable: true
    B32:
      type: string
      description: Wrapper around a zeroizing 32-byte fixed-size array
    CoinbaseAmount:
      type: object
      description: A `{ value, currency }` amount pair used throughout Coinbase responses.
      required:
      - value
      - currency
      properties:
        currency:
          type: string
          description: Asset symbol (e.g. `"USD"`, `"BTC"`).
        value:
          type: string
          description: 'Decimal-string amount (Coinbase preserves precision by not converting

            to floats).'
    BinanceUniversalTransferHistoryParams:
      allOf:
      - $ref: '#/components/schemas/UniversalTransferHistoryRequest'
      - type: object
        required:
        - keyId
        properties:
          dryRun:
            allOf:
            - $ref: '#/components/schemas/BinanceDryRunMode'
            nullable: true
          keyId:
            $ref: '#/components/schemas/Id'
          recvWindow:
            type: number
            format: float
            description: 'Optional "receive window", i.e., for how long the request stays valid.

              May only be specified in milliseconds, with up to three decimal places of precision.

              If omitted, defaults to 10000. Must not be greater than 60000.'
            nullable: true
      description: Parameters envelope for all Binance RPC methods.
    CoinbaseListPortfoliosParams:
      allOf:
      - $ref: '#/components/schemas/ListPortfoliosRequest'
      - type: object
        required:
        - key_id
        properties:
          dry_run:
            allOf:
            - $ref: '#/components/schemas/CoinbaseDryRunMode'
            nullable: true
          key_id:
            $ref: '#/components/schemas/Id'
      description: Parameters envelope for all Coinbase RPC methods.
    SolanaTxCmp:
      type: object
      properties:
        ignore_blockhash:
          type: boolean
          description: Whether the 'recent_blockhash' property of the Solana transaction is allowed to be different.
    RetryTransactionRequest:
      allOf:
      - $ref: '#/components/schemas/EvmTxCustomization'
      - type: object
        required:
        - id
        properties:
          id:
            type: string
            description: The transaction id.
      description: Parameters for the [`cs_retryTransaction`](RpcMethod::RetryTransaction) method.
    InternalErrorCode:
      type: string
      enum:
      - NoMaterialId
      - InvalidAuditLogEntry
      - UnexpectedCheckerRule
      - UnresolvedPolicyReference
      - UnexpectedAclAction
      - FidoKeyAssociatedWithMultipleUsers
      - ClaimsParseError
      - InvalidThrottleId
      - InvalidEmailAddress
      - EmailTemplateRender
      - OidcIdentityHeaderMissing
      - OidcIdentityParseError
      - SystemTimeError
      - PasswordHashParseError
      - SendMailError
      - ReqwestError
      - EmailConstructionError
      - TsWriteError
      - TsQueryError
      - DbQueryError
      - DbGetError
      - DbDeleteError
      - DbPutError
      - DbUpdateError
      - SerdeError
      - TestAndSetError
      - DbGetItemsError
      - DbWriteError
      - CubistSignerError
      - CwListMetricsError
      - CwPutMetricDataError
      - GetAwsSecretError
      - SecretNotFound
      - KmsGenerateRandomError
      - MalformedTotpBytes
      - KmsGenerateRandomNoResponseError
      - CreateKeyError
      - ParseDerivationPathError
      - SplitSignerError
      - CreateImportKeyError
      - CreateEotsNoncesError
      - EotsSignError
      - BabylonCovSignError
      - CognitoDeleteUserError
      - CognitoListUsersError
      - CognitoGetUserError
      - MissingUserEmail
      - CognitoResendUserInvitation
      - CognitoSetUserPasswordError
      - GenericInternalError
      - AssumeRoleWithoutEvidence
      - OidcAuthWithoutOrg
      - MissingKeyMetadata
      - KmsEnableKeyError
      - KmsDisableKeyError
      - LambdaInvokeError
      - LambdaNoResponseError
      - LambdaFailure
      - LambdaUnparsableResponse
      - SerializeEncryptedExportKeyError
      - DeserializeEncryptedExportKeyError
      - ReEncryptUserExport
      - S3UploadError
      - S3DownloadError
      - S3CopyError
      - S3ListObjectsError
      - S3DeleteObjectsError
      - S3BuildError
      - S3PresignedUrlError
      - ManagedStateMissing
      - InternalHeaderMissing
      - InvalidInternalHeaderValue
      - RequestLocalStateAlreadySet
      - OidcOrgMismatch
      - OidcIssuerInvalidJwk
      - InvalidPkForMaterialId
      - SegwitTweakFailed
      - UncheckedOrg
      - SessionOrgIdMissing
      - AvaSignCredsMissing
      - AvaSignSignatureMissing
      - ExpectedRoleSession
      - InvalidThirdPartyIdentity
      - CognitoGetUser
      - SnsSubscribeError
      - SnsUnsubscribeError
      - SnsGetSubscriptionAttributesError
      - SnsSubscriptionAttributesMissing
      - SnsSetSubscriptionAttributesError
      - SnsPublishBatchError
      - InconsistentMultiValueTestAndSet
      - MaterialIdError
      - InvalidBtcAddress
      - HistoricalTxBodyMissing
      - InvalidOperation
      - ParentOrgNotFound
      - OrgParentLoop
      - ResolvedParentOrgWithNoScopeCeiling
      - InvalidUploadObjectId
      - PolicyEngineNotFound
      - PolicyEngineError
      - PolicySecretsEncryptionError
      - CreatePolicyImportKeyError
      - InvalidAlias
      - EmptyUpdateModifiedObject
      - EmptyUpdateModifiedActions
      - DbContactAddressesInvalid
      - InvalidEvmSigedRlp
      - InvalidErc20Data
      - InvalidRpcUrl
    SubAccountTransferHistoryRequest:
      type: object
      description: 'Parameters for `GET /sapi/v1/sub-account/transfer/subUserHistory`.


        Lists the transfer history of the calling sub-account. Covers both

        sub-to-master and sub-to-sub transfers. All filters are optional; if

        `start_time`/`end_time` are omitted, Binance returns the most recent 30

        days. If `r#type` is omitted, Binance defaults to `TransferOut` (`2`).'
      properties:
        asset:
          type: string
          description: Filter to a specific asset (e.g. `"USDT"`).
          nullable: true
        endTime:
          type: integer
          format: int64
          description: Window end (ms since epoch).
          nullable: true
          minimum: 0
        limit:
          type: integer
          format: int32
          description: 'Page size (Binance default: 500).'
          nullable: true
          minimum: 0
        returnFailHistory:
          type: boolean
          description: 'If `true`, include failed transfers in the response. Binance defaults

            to `false`.'
          nullable: true
        startTime:
          type: integer
          format: int64
          description: Window start (ms since epoch).
          nullable: true
          minimum: 0
        type:
          type: integer
          format: int32
          description: Direction filter (`1` = transfer in, `2` = transfer out).
          nullable: true
          minimum: 0
    EvmTxDepositErrorCode:
      type: string
      enum:
      - EvmTxDepositReceiverMismatch
      - EvmTxDepositEmptyData
      - EvmTxDepositEmptyChainId
      - EvmTxDepositEmptyReceiver
      - EvmTxDepositUnexpectedValue
      - EvmTxDepositUnexpectedDataLength
      - EvmTxDepositNoAbi
      - EvmTxDepositNoDepositFunction
      - EvmTxDepositUnexpectedFunctionName
      - EvmTxDepositUnexpectedValidatorKey
      - EvmTxDepositInvalidValidatorKey
      - EvmTxDepositMissingDepositArg
      - EvmTxDepositWrongDepositArgType
      - EvmTxDepositValidatorKeyNotInRole
      - EvmTxDepositUnexpectedWithdrawalCredentials
      - EvmTxDepositUnresolvedRole
      - EvmTxDepositInvalidDepositEncoding
    CreateTransactionRequest:
      oneOf:
      - allOf:
        - $ref: '#/components/schemas/CreateEvmTransactionRequest'
        - type: object
          required:
          - chain
          properties:
            chain:
              type: string
              enum:
              - Evm
      description: Parameters for the [`cs_createTransaction`](RpcMethod::CreateTransaction) method.
      discriminator:
        propertyName: chain
    ErrorResponse:
      type: object
      description: The structure of ErrorResponse must match the response template that AWS uses
      required:
      - message
      - error_code
      properties:
        accepted:
          allOf:
          - $ref: '#/components/schemas/AcceptedValue'
          nullable: true
        error_code:
          $ref: '#/components/schemas/SignerErrorCode'
        message:
          type: string
          description: Error message
        policy_eval_tree:
          description: Optional policy evaluation tree (included in signer responses, when requested)
          nullable: true
        request_id:
          type: string
          description: Optional request identifier
    WithdrawHistoryRequest:
      type: object
      description: 'Parameters for `GET /sapi/v1/capital/withdraw/history`.


        Returns the master account''s withdrawal history. All filters are

        optional; if `start_time`/`end_time` are omitted, Binance returns the

        most recent 90 days. Use `id_list` to look up specific withdrawals by

        the `id` returned from [`BinanceRpc::Withdraw`], or `withdraw_order_id`

        to look one up by its client-supplied id.'
      properties:
        coin:
          type: string
          description: Filter to a specific asset (e.g. `"USDT"`).
          nullable: true
  

# --- truncated at 32 KB (96 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cubist/refs/heads/main/openapi/cubist-rpc-api-openapi.yml