openapi: 3.0.3
info:
  version: '1.0'
  title: Crypto API
  description: Reference for Sardine Crypto API
  contact:
    email: support@sardine.io
    name: Sardine
    url: docs.sardine.io
servers:
- url: https://api.sandbox.sardine.ai/v1
  description: Sandbox
- url: https://api.sardine.ai/v1
  description: Prod Server
paths:
  /auth/client-tokens:
    post:
      tags: ["User Onboarding"]
      summary: Get Client Token
      description: "Exchange your `clientId` and `clientSecret` for a `clientToken` that can be be used in frontend code.\
        \ `clientToken` will be unusable after the `expiresAt` time, which will normally be after 30 min. \n\n\nTo try the\
        \ request in the mock server on the right, substitute username for clientId and password for clientSecret. \n\nIf\
        \ `reference_id` is passed, it will be passed to the Order object upon when the transaction happens. It can then be\
        \ used as a filter in the /orders endpoint"
      operationId: post-crypto-auth-client_session_token
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              type: object
              x-examples:
                example-1:
                  referenceId: 42eadcb0-4a93-45af-9c8c-d295db5aeb6c
                  nft:
                    name: The best nft
                    price: 100
                    currencyCode: USD
                    contractAddress: '0x7fC0344254E1663C2eF24e3c063cbec231525C20'
                    imageUrl: https://gateway.autograph.io/ipfsQmSAQm4gbhjSeUk7fuYppHd7Z8dfWpBvnFmqFSKqkrUJPM
                  identityPrefill:
                    firstName: fname
                    lastName: lname
                    dateOfBirth: '2000-01-01'
                    emailAddress: foobar@gmail.com
                    phone: '+19254485826'
                    address:
                      street1: 123 main st
                      street2: ''
                      city: irvine
                      regionCode: CA
                      postalCode: '02747'
                      countryCode: US
              properties:
                referenceId:
                  type: string
                  description: Unique id representing a new session, must be regenerated for each call
                customerId:
                  type: string
                  description: ID of customer
                externalUserId:
                  type: string
                  description: An ID generated by the merchant to uniquely identity a user.
                  format: uuid
                identityPrefill:
                  type: object
                  description: If these fields are filled, they will be pre filled into the UI
                  properties:
                    firstName:
                      type: string
                      description: First name of user
                    lastName:
                      type: string
                      description: Last name of user
                    dateOfBirth:
                      type: string
                      description: Date of birth in YYYY-MM-DD format
                    emailAddress:
                      type: string
                      description: Verified email of the user
                    phone:
                      type: string
                      description: Verified phone number of user
                    address:
                      type: object
                      properties:
                        street1:
                          type: string
                          description: Street address
                        street2:
                          type: string
                          description: Suite, Apt, etc
                        city:
                          type: string
                          description: 'City '
                        regionCode:
                          type: string
                          description: State or province
                        postalCode:
                          type: string
                          description: 'Zipcode '
                        countryCode:
                          type: string
                          description: ISO standard 2 digit country code
                paymentMethodTypeConfig:
                  type: object
                  properties:
                    default:
                      type: string
                      enum:
                      - us_debit
                      - us_credit
                      - international_debit
                      - international_credit
                      - apple-pay
                      - ach
                      description: 'The payment method that shows as default in the Sardine onramp

                        '
                    enabled:
                      type: array
                      description: List of payment methods supported by Sardine
                      items:
                        type: string
                        enum:
                        - us_debit
                        - us_credit
                        - international_debit
                        - international_credit
                        - apple-pay
                        - ach
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  clientToken:
                    type: string
                    description: Authentication token returned
                  expiresAt:
                    type: string
                    description: Timestamp when clientToken will expire
                x-examples:
                  example-1:
                    clientToken: 8aeae330-9154-4051-ab98-d173ba2bc7f0
      security:
      - ClientToken: []
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
      x-stoplight:
        id: pj8ogyyuc84ou
  /quotes:
    get:
      tags: ["Quote"]
      summary: Get Quote
      description: 'Sardine returns a quote on the amount of cryptocurrency that can be purchased or sold (for off-ramp),
        along with the associated fees, which are as follows


        - Network fee - Also known as "gas", paid out to faciliate and validate the transaction


        - Processing fee: Used to cover Sardine''s cost of money movement, fraud check and compliance'
      operationId: get-trade-quote
      parameters:
      - name: asset_type
        in: query
        description: Cryptocurrency asset user wants to purchase
        required: true
        schema:
          type: string
      - name: network
        in: query
        description: Blockchain on which the `asset_type` is present
        required: true
        schema:
          type: string
      - name: total
        in: query
        description: 'Amount the user wants to buy or sell. '
        required: true
        schema:
          type: number
      - name: currency
        in: query
        description: The currency type in which the quote is supplied
        schema:
          type: string
          default: USD
      - name: paymentType
        in: query
        description: The payment method that the user will use for the transaction
        schema:
          type: string
          enum:
          - ach
          - debit
          - credit
          - us_debit
          - international_debit
          - international_credit
      - name: quote_type
        in: query
        description: Select for the required activity `buy` for on ramp and `sell` for off ramp
        schema:
          type: string
          enum:
          - buy
          - sell
          default: buy
      - name: walletAddress
        in: query
        description: 'Wallet address of User. This is used to calculate if User has previously used Sardine, and provide them
          with a more accurate quote. '
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Quote'
      security:
      - ClientToken: []
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
      x-stoplight:
        id: arttpyxaxblh3
  /supported-tokens:
    get:
      tags: ["Coverage"]
      summary: Get Supported Tokens
      description: 'Fetch list of tokens supported. '
      operationId: get-get_tokens
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        token:
                          type: string
                          description: Symbol of cryptocurrency
                        tokenName:
                          type: string
                          description: Full name of cryptocurrency
                        network:
                          type: string
                          description: Name of network, token is available on
                        decimals:
                          type: integer
                          description: Number of decimal points that the crypto can have
                        chainId:
                          type: integer
                          description: chainID if network is EVM compatible
                          nullable: true
                        tokenAddress:
                          type: string
                          description: address if token is ERC-20
                x-examples:
                  example-1:
                    data:
                    - token: AAVE
                      tokenName: Aave
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      tokenAddress: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9'
                    - token: ADA
                      tokenName: Cardano
                      network: cardano
                      decimals: 6
                      chainId: null
                      tokenAddress: null
                    - token: ALGO
                      tokenName: Algorand
                      network: algorand
                      decimals: 6
                      chainId: null
                      tokenAddress: null
                    - token: AXS
                      tokenName: Axie Infinity
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      tokenAddress: '0xBB0E17EF65F82Ab018d8EDd776e8DD940327B28b'
                    - token: AVAX
                      tokenName: Avalanche
                      network: avalanche_c-chain
                      decimals: 18
                      chainId: 43114
                      tokenAddress: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7'
                    - token: BAT
                      tokenName: Basic Attention Token
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      tokenAddress: '0x0D8775F648430679A709E98d2b0Cb6250d2887EF'
                    - token: BCH
                      tokenName: Bitcoin Cash
                      network: bitcoin_cash
                      decimals: 8
                      chainId: null
                      tokenAddress: null
                    - token: BTC
                      tokenName: Bitcoin
                      network: bitcoin
                      decimals: 8
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: BUSD
                      tokenName: Binance USD
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x4Fabb145d64652a948d72533023f6E7A623C7C53'
                    - token: COMP
                      tokenName: Compound
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xc00e94Cb662C3520282E6f5717214004A7f26888'
                    - token: DAI
                      tokenName: Dai
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x6B175474E89094C44Da98b954EedeAC495271d0F'
                    - token: DOGE
                      tokenName: Dogecoin
                      network: dogecoin
                      decimals: 8
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: DOT
                      tokenName: Polkadot
                      network: polkadot
                      decimals: 10
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: EGLD
                      tokenName: Elrond
                      network: elrond
                      decimals: 18
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: ENJ
                      tokenName: Enjin Coin
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c'
                    - token: EOS
                      tokenName: EOS
                      network: eos
                      decimals: 4
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: ETH
                      tokenName: Ethereum
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: ETC
                      tokenName: Ethereum Classic
                      network: ethereum_classic
                      decimals: 372
                      chainId: 61
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: FTM
                      tokenName: Fantom
                      network: fantom
                      decimals: 18
                      chainId: 250
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: GRT
                      tokenName: The Graph
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xc944E90C64B2c07662A292be6244BDf05Cda44a7'
                    - token: Hedera
                      tokenName: HBAR
                      network: hedera
                      decimals: 8
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: KNC
                      tokenName: Kyber Network
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202'
                    - token: LINK
                      tokenName: Chainlink
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x514910771AF9Ca656af840dff83E8264EcF986CA'
                    - token: Litecoin
                      tokenName: LTC
                      network: litecoin
                      decimals: 8
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: MANA
                      tokenName: MANA
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x0F5D2fB29fb7d3CFeE444a200298f468908cC942'
                    - token: MATIC
                      tokenName: Polygon
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0'
                    - token: MKR
                      tokenName: Maker
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2'
                    - token: OMG
                      tokenName: OMG Network
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xd26114cd6EE289AccF82350c8d8487fedB8A0C07'
                    - token: PAXG
                      tokenName: Pax Gold
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x45804880De22913dAFE09f4980848ECE6EcbAf78'
                    - token: SAND
                      tokenName: The Sandbox
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x3845badAde8e6dFF049820680d1F14bD3903a5d0'
                    - token: SHIB
                      tokenName: SHIBA INU
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE'
                    - token: SOL
                      tokenName: Solana
                      network: solana
                      decimals: 9
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: TUSD
                      tokenName: TrueUSD
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x0000000000085d4780B73119b644AE5ecd22b376'
                    - token: UNI
                      tokenName: Uniswap
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984'
                    - token: USDC
                      tokenName: USD Coin
                      network: ethereum
                      decimals: 6
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
                    - token: USDP
                      tokenName: Pax Dollar
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x8E870D67F660D95d5be530380D0eC0bd388289E1'
                    - token: USDT
                      tokenName: Tether
                      network: ethereum
                      decimals: 6
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xdAC17F958D2ee523a2206206994597C13D831ec7'
                    - token: WBTC
                      tokenName: Wrapped BTC
                      network: ethereum
                      decimals: 8
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599'
                    - token: XLM
                      tokenName: Stellar
                      network: stellar
                      decimals: 6
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: XRP
                      tokenName: Ripple
                      network: ripple
                      decimals: 6
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: XTZ
                      tokenName: Tezos
                      network: tezos
                      decimals: 6
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: ZRX
                      tokenName: 0x
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xE41d2489571d322189246DaFA5ebDe1F4699F498'
      security:
      - ClientToken: []
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
      x-stoplight:
        id: 636fiu1de9hzf
  /enabled-tokens:
    get:
      tags: ["Coverage"]
      summary: Get Enabled Tokens
      description: 'Fetch list of tokens supported. '
      operationId: get_tokens
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        token:
                          type: string
                          description: Symbol of cryptocurrency
                        tokenName:
                          type: string
                          description: Full name of cryptocurrency
                        network:
                          type: string
                          description: Name of network, token is available on
                        decimals:
                          type: integer
                          description: Number of decimal points that the crypto can have
                        chainId:
                          type: integer
                          description: chainID if network is EVM compatible
                          nullable: true
                        tokenAddress:
                          type: string
                          description: address if token is ERC-20
                x-examples:
                  example-1:
                    data:
                    - token: AAVE
                      tokenName: Aave
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      tokenAddress: '0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9'
                    - token: ADA
                      tokenName: Cardano
                      network: cardano
                      decimals: 6
                      chainId: null
                      tokenAddress: null
                    - token: ALGO
                      tokenName: Algorand
                      network: algorand
                      decimals: 6
                      chainId: null
                      tokenAddress: null
                    - token: AXS
                      tokenName: Axie Infinity
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      tokenAddress: '0xBB0E17EF65F82Ab018d8EDd776e8DD940327B28b'
                    - token: AVAX
                      tokenName: Avalanche
                      network: avalanche_c-chain
                      decimals: 18
                      chainId: 43114
                      tokenAddress: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7'
                    - token: BAT
                      tokenName: Basic Attention Token
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      tokenAddress: '0x0D8775F648430679A709E98d2b0Cb6250d2887EF'
                    - token: BCH
                      tokenName: Bitcoin Cash
                      network: bitcoin_cash
                      decimals: 8
                      chainId: null
                      tokenAddress: null
                    - token: BTC
                      tokenName: Bitcoin
                      network: bitcoin
                      decimals: 8
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: BUSD
                      tokenName: Binance USD
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x4Fabb145d64652a948d72533023f6E7A623C7C53'
                    - token: COMP
                      tokenName: Compound
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xc00e94Cb662C3520282E6f5717214004A7f26888'
                    - token: DAI
                      tokenName: Dai
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x6B175474E89094C44Da98b954EedeAC495271d0F'
                    - token: DOGE
                      tokenName: Dogecoin
                      network: dogecoin
                      decimals: 8
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: DOT
                      tokenName: Polkadot
                      network: polkadot
                      decimals: 10
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: EGLD
                      tokenName: Elrond
                      network: elrond
                      decimals: 18
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: ENJ
                      tokenName: Enjin Coin
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c'
                    - token: EOS
                      tokenName: EOS
                      network: eos
                      decimals: 4
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: ETH
                      tokenName: Ethereum
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: ETC
                      tokenName: Ethereum Classic
                      network: ethereum_classic
                      decimals: 372
                      chainId: 61
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: FTM
                      tokenName: Fantom
                      network: fantom
                      decimals: 18
                      chainId: 250
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: GRT
                      tokenName: The Graph
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xc944E90C64B2c07662A292be6244BDf05Cda44a7'
                    - token: Hedera
                      tokenName: HBAR
                      network: hedera
                      decimals: 8
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: KNC
                      tokenName: Kyber Network
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xdeFA4e8a7bcBA345F687a2f1456F5Edd9CE97202'
                    - token: LINK
                      tokenName: Chainlink
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x514910771AF9Ca656af840dff83E8264EcF986CA'
                    - token: Litecoin
                      tokenName: LTC
                      network: litecoin
                      decimals: 8
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: MANA
                      tokenName: MANA
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x0F5D2fB29fb7d3CFeE444a200298f468908cC942'
                    - token: MATIC
                      tokenName: Polygon
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0'
                    - token: MKR
                      tokenName: Maker
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2'
                    - token: OMG
                      tokenName: OMG Network
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xd26114cd6EE289AccF82350c8d8487fedB8A0C07'
                    - token: PAXG
                      tokenName: Pax Gold
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x45804880De22913dAFE09f4980848ECE6EcbAf78'
                    - token: SAND
                      tokenName: The Sandbox
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x3845badAde8e6dFF049820680d1F14bD3903a5d0'
                    - token: SHIB
                      tokenName: SHIBA INU
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE'
                    - token: SOL
                      tokenName: Solana
                      network: solana
                      decimals: 9
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: TUSD
                      tokenName: TrueUSD
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x0000000000085d4780B73119b644AE5ecd22b376'
                    - token: UNI
                      tokenName: Uniswap
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984'
                    - token: USDC
                      tokenName: USD Coin
                      network: ethereum
                      decimals: 6
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
                    - token: USDP
                      tokenName: Pax Dollar
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x8E870D67F660D95d5be530380D0eC0bd388289E1'
                    - token: USDT
                      tokenName: Tether
                      network: ethereum
                      decimals: 6
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xdAC17F958D2ee523a2206206994597C13D831ec7'
                    - token: WBTC
                      tokenName: Wrapped BTC
                      network: ethereum
                      decimals: 8
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599'
                    - token: XLM
                      tokenName: Stellar
                      network: stellar
                      decimals: 6
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: XRP
                      tokenName: Ripple
                      network: ripple
                      decimals: 6
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: XTZ
                      tokenName: Tezos
                      network: tezos
                      decimals: 6
                      chainId: null
                      destinationTagRequired: false
                      tokenAddress: null
                    - token: ZRX
                      tokenName: 0x
                      network: ethereum
                      decimals: 18
                      chainId: 1
                      destinationTagRequired: false
                      tokenAddress: '0xE41d2489571d322189246DaFA5ebDe1F4699F498'
      security:
      - ClientToken: []
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
      x-stoplight:
        id: 3xhrbo7m3a6gg
  /payment-methods:
    get:
      tags: ["Payment Method"]
      summary: Get Payment Method information
      description: Get information about User's payment methods
      operationId: get-user-payment_method
      parameters:
      - name: userId
        in: query
        description: ID of User
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_method_type:
                    type: string
                  payment_method:
                    $ref: '#/components/schemas/BankAccount'
      security: []
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
  /orders/{orderId}:
    get:
      tags: ["Order"]
      summary: Get an Order by ID
      description: "Fetch information about an Order once its completed\n\nThe `status` of an Order can be one of the following\n\
        \n`Draft` - This is an open or ongoing order\n\n`Processed`* - The payment has been completed.\n\n`Declined`* - The\
        \ transacation was declined, due to payment method issues\n\n`UserCustody` - Crypto purchased for user but is in Sardine's\
        \ custodied wallet\n\n`Complete` - The payment is complete and the crypto has been delivered to the user's wallet.\
        \ A `txHash` will be present to denote successful on chain settlement. \n\n`Expired` - Order expired before execution\n\
        \nEvents marked with an * can also be captured via event handlers on the frontend\n\n\n### Fetching Orders\n\nFull\
        \ list of Orders is obtained by making a call to the endpoint with no filters. \n\n\nYou have multiple options of\
        \ filtering orders\n\n**1. Filtering by `order_id`**\n\nIf a `redirect_url` was passed to the Sardine checkout (e.g.\
        \ https://crytpoapp.com\"), when then transaction is completed, Sardine will redirect the user to this url with an\
        \ `order_id` appended i.e. https://cryptoapp.com?order_id=73103-erhed-317313\n\nThis `order_id` can then be used as\
        \ a filter on this endpoint\n\nE.g. `/v1/orders/491c113c-4485-47cd-b011-252068b753dc`\n\n**2. Filtering by `referenceId`**\n\
        If a `referenceId` was passed in the call to create the `clientToken` for this call, it can now be used to filter\
        \ for Orders that were created then. \n\nE.g. `/v1/orders?referenceId=42ead95db5aeb6c`\n\n**3. Filtering by `externalUserId`**\n\
        \nIf a `externalUserId` was passed in /auth/client-tokens, it can be used to filter for Orders with that ID. This\
        \ is useful for associating transactions with a user\n\n\n\n\n**3. Filtering by `startDate` and `endDate`**\nIf `startDate`\
        \ or `endDate` are passed in YYYY-MM-DD format, the list of Orders will be filtered to those that were created in\
        \ this range\n\nE.g. `/v1/orders?startDate=2022-08-01&endDate=2022-08-15`\n\n\n\n`paymentStatus` field within the\
        \ `payment` object in the response can be\n\n- Draft\n- Pending\n\nFor bank transfers, the value could be\n\n- Sent\n\
        - Complete\n- Returned\n- Failed\n\nFor card transactions, the value can be\n\n- Authorized\n- Captured\n- Declined\n\
        - Pending3DS\n- Failure3DS\n- Voided"
      operationId: get-order-order_id
      parameters:
      - name: referenceId
        in: query
        description: If a `referenceId` is passed when creating the `clientToken`, it can be used as a filter
        schema:
          type: string
          format: uuid
      - name: limit
        in: query
        description: Number of results returned
        schema:
          type: string
      - name: startDate
        in: query
        description: Date in YYYY-MM-DD
        schema:
          type: string
      - name: endDate
        in: query
        description: Date in YYYY-MM-DD
        schema:
          type: string
      - name: externalUserId
        in: query
        description: Filter using `externalUserId` to obtain all Orders associated with a particular user
        schema:
          type: string
          format: uuid
      - name: orderId
        in: path
        description: ID of Order
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  createdAt:
                    type: string
                  confirmedAt:
                    type: string
                  referenceId:
                    type: string
                  status:
                    type: string
                  fiatCurrency:
                    type: string
                  transactionId:
                    type: string
                  walletAddress:
                    type: string
                  expiresAt:
                    type: string
                  userId:
                    type: string
                  total:
                    type: integer
                  subtotal:
                    type: integer
                  processingFees:
                    type: object
                    properties:
                      transactionFee:
                        type: integer
                      networkFee:
                        type: number
                  payment:
                    type: object
                    properties:
                      amountCents:
                        type: integer
                      currency:
                        type: string
                      paymentMethodId:
                        type: string
                      paymentMethodType:
                        type: string
                  withdrawal:
                    type: object
                    properties:
                      txHash:
                        type: string
                      walletAddress:
                        type: string
                      quantity:
                        type: number
                  withdrawals:
                    type: array
                    description: Sample
                    items:
                      type: object
                      properties:
                        walletAddress:
                          type: string
                        holdAmount:
                          type: integer
                        holdUntil:
                          type: string
                        quantity:
                          type: number
                        isHold:
                          type: boolean
                        status:
                          type: string
                        txHash:
                          type: string
                        withdrawnAt:
                          type: string
                x-examples:
                  Example 1:
                    id: 0113e40a-7406-4036-a882-745a3275e614
                    createdAt: '2023-03-10T20:46:29Z'
                    confirmedAt: '2023-03-10T20:46:33Z'
                    referenceId: test-0.7142516498128628
                    status: Complete
                    fiatCurrency: USD
                    transactionId: 7b47afca-4a6d-4cd3-a756-03db3281b932
                    walletAddress: '0x3d0babc12ac0b08f933a837dbb7a9943be35b0fc'
                    expiresAt: '2023-03-10T20:51:29Z'
                    userId: afceb64d-2d0b-4e52-8b99-a6a4eafc8515
                    total: 10
                    subtotal: 0
                    processingFees:
                      transactionFee: 0
                      networkFee: 1.05
                    payment:
                      amountCents: 1000
                      currency: USD
                      paymentMethodId: cfb30490-62da-4bcb-8179-5e18953d0117
                      paymentMethodType: Bank
                    withdrawal:
                      txHash: '0xbb45ae53e0ca10e598cf9d0ffedf554e8a72ca4a611a3f883474e0d6864eda5a'
                      walletAddress: '0x3d0babc12ac0b08f933a837dbb7a9943be35b0fc'
                    withdrawals:
                    - walletAddress: '0x3d0babc12ac0b08f933a837dbb7a9943be35b0fc'
                      holdAmount: 5
                      holdUntil: '2023-03-14T20:46:14.675+00:00'
                      quantity: 0.003091455
                      isHold: true
                      status: HOLD
                    - txHash: '0xbb45ae53e0ca10e598cf9d0ffedf554e8a72ca4a611a3f883474e0d6864eda5a'
                      walletAddress: '0x3d0babc12ac0b08f933a837dbb7a9943be35b0fc'
                      quantity: 0.003091455
                      isHold: false
                      status: SETTLED
                      withdrawnAt: '2023-03-10T20:46:58Z'
      security:
      - ClientToken: []
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
      x-stoplight:
        id: eg8e6vpyxx951
  /orders:
    get:
      tags: ["Order"]
      summary: Get User Orders
      description: This endpoint retrieves the list of orders placed by the user, with optional filtering based on specific query parameters like userId.
      operationId: get-user-orders
      parameters:
        - name: userId
          in: query
          required: true
          description: The ID of the user whose orders are being retrieved
          schema:
            type: string
        - name: status
          in: query
          required: false
          description: Filter orders by status (e.g., pending, completed)
          schema:
            type: string
        - name: fromDate
          in: query
          required: false
          description: Filter orders created after this date (ISO 8601 format)
          schema:
            type: string
            format: date-time
        - name: toDate
          in: query
          required: false
          description: Filter orders created before this date (ISO 8601 format)
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Successfully retrieved user orders
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        orderId:
                          type: string
                          description: Unique identifier for the order
                        fromCurrency:
                          type: string
                          description: The cryptocurrency involved in the order (e.g., ETH)
                        toCurrency:
                          type: string
                          description: The fiat currency for the transaction (e.g., USD)
                        amount:
                          type: number
                          description: Amount of cryptocurrency involved
                        status:
                          type: string
                          description: The current status of the order (e.g., pending, completed)
                        createdAt:
                          type: string
                          format: date-time
                          description: The timestamp when the order was created
              examples:
                example-1:
                  value:
                    orders:
                      - orderId: OFF-20250417-001
                        fromCurrency: ETH
                        toCurrency: USD
                        amount: 0.05
                        status: pending
                        createdAt: "2025-04-17T10:00:00Z"
                      - orderId: OFF-20250416-002
                        fromCurrency: BTC
                        toCurrency: USD
                        amount: 0.2
                        status: completed
                        createdAt: "2025-04-16T14:30:00Z"
  /customers:
    post:
      tags: ["User Onboarding"]
      summary: Post Customer Information
      description: Send User information to Sardine to store theie information and create a risk profile
      operationId: post-customers
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                flow:
                  type: string
                  description: Merchant defined string that defines the flow the user is in
                  minLength: 1
                sessionKey:
                  type: string
                  description: uuid that identifies the given customer session
                  format: uuid
                  minLength: 1
                customer:
                  type: object
                  properties:
                    id:
                      type: string
                      description: User ID hash. Please use the same value as passed to device intelligence SDK
                      format: uuid
                      minLength: 1
                    taxId:
                      type: string
                      description: SSN or equivalent
                      minLength: 1
                    firstName:
                      type: string
                      description: First name of customer
                      minLength: 1
                    lastName:
                      type: string
                      description: Last name of customer
                      minLength: 1
                    dateOfBirth:
                      type: string
                      description: Date of birth in YYYY-MM-DD
                      format: date
                      minLength: 1
                    address:
                      type: object
                      properties:
                        street1:
                          type: string
                          description: Street name
                          minLength: 1
                        city:
                          type: string
                          description: City name
                          minLength: 1
                        regionCode:
                          type: string
                          description: 2 digit State or province code
                          minLength: 1
                        postalCode:
                          type: string
                          description: Postal or Zip code
                          minLength: 1
                        countryCode:
                          type: string
                          description: 2 digit Country code
                          minLength: 1
                      required:
                      - street1
                      - city
                      - regionCode
                      - postalCode
                      - countryCode
                    transaction:
                      type: object
                      properties:
                        id:
                          type: string
                          description: ID to be associated with transaction
                          format: uuid
                          minLength: 1
                        createdAtMillis:
                          type: number
                          description: Time of transaction in UNIX time
                        amount:
                          type: number
                          description: Transaction amount
                        itemCategory:
                          type: string
                          description: Main item category in cart. e.g. crypto asset(ETH, BTC), gift card, alcohol, generic
                          minLength: 1
                        actionType:
                          type: string
                          enum:
                          - buy
                          - sell
                          - deposit
                          - exchange
                          - withdraw
                          - refund
                          - payment
                          - topup
                          - transfer
                          description: Indicates the type of transaction. If you need other action types to be supported,
                            please reach out to the Sardine team.
                          minLength: 1
                        currencyCode:
                          type: string
                          description: 3-digit ISO 4217currency code
                          minLength: 1
                        paymentMethod:
                          type: object
                          properties:
                            type:
                              minLength: 1
                              enum:
                              - crypto
                            bank:
                              type: object
                              properties:
                                accountNumber:
                                  type: string
                                  description: Account number of banka account
                                  minLength: 1
                                routingNumber:
                                  type: string
                                  description: Routing number of bank account
                                  minLength: 1
                                accountType:
                                  type: string
                                  enum:
                                  - checking
                                  - savings
                                  - other
                                  description: Type of account
                                  minLength: 1
                                balance:
                                  type: number
                                  description: Last known bank balance in minor units like cents
                                balanceCurrencyCode:
                                  type: string
                                  description: 3 digit currency code
                                  minLength: 1
                              required:
                              - accountNumber
                              - routingNumber
                              - accountType
                              - balance
                              - balanceCurrencyCode
                          required:
                          - type
                          - bank
                      required:
                      - id
                      - createdAtMillis
                      - amount
                      - itemCategory
                      - actionType
                      - currencyCode
                      - paymentMethod
                    emailAddress:
                      type: string
                      description: Email address of customer
                      format: email
                      minLength: 1
                    isEmailVerified:
                      type: boolean
                      description: Set to true if email has been verified
                    phone:
                      type: string
                      description: Phone number including country
                      minLength: 1
                    isPhoneVerified:
                      type: boolean
                      description: Set to true if phone has been verified via a one time code
                    createdAtMills:
                      type: integer
                      description: This is time the customer was onboarded/created in your system. Please pass it as Unix
                        timestamp in milliseconds. e.g. 1622057169587 for Wed May 22021 19:26:09
                    personalInfo:
                      type: array
                      items:
                        type: object
                        properties:
                          source:
                            type: string
                            enum:
                            - id_verification
                            - bank_verification
                            - phone_verification
                            description: Source of personal information obtained via external third-party (non-Sardine) for
                              verification. Discuss with Sardine before using
                          firstName:
                            type: string
                            description: First name
                          middleName:
                            type: string
                            description: Middle name
                          lastName:
                            type: string
                            description: Last name
                          address:
                            type: object
                            properties:
                              street1:
                                type: string
                                description: Street
                              street2:
                                type: string
                              city:
                                type: string
                              regionCode:
                                type: string
                              postalCode:
                                type: string
                              countryCode:
                                type: string
                              company:
                                type: string
                          dateOfBirth:
                            type: string
                        required:
                        - source
                  required:
                  - id
                  - taxId
                  - firstName
                  - lastName
                  - dateOfBirth
                  - address
                  - transaction
                  - emailAddress
                  - isEmailVerified
                  - phone
                  - isPhoneVerified
              required:
              - flow
              - sessionKey
              - customer
              x-examples:
                example-1:
                  flow: string
                  sessionKey: string
                  personalInfo:
                  - source: plaid
                    firstName: string
                    middleName: string
                    lastName: string
                    address:
                      street1: string
                      street2: string
                      city: string
                      regionCode: string
                      postalCode: string
                      countryCode: string
                      company: string
                    phone: string
                    emailAddress: string
                    isEmailVerified: true
                    isPhoneVerified: true
                    dateOfBirth: string
                    identityObject: string
                  customer:
                    id: string
                    taxId: string
                    firstName: string
                    lastName: string
                    dateOfBirth: string
                    address:
                      street1: string
                      city: string
                      regionCode: string
                      postalCode: string
                      countryCode: string
                    transaction:
                      id: string
                      createdAtMillis: 0
                      amount: 0
                      itemCategory: string
                      actionType: string
                      currencyCode: string
                      paymentMethod:
                        type: string
                        bank:
                          accountNumber: string
                          routingNumber: string
                          accountType: string
                          balance: 0
                          balanceCurrencyCode: string
                    isEmailVerified: true
                    emailAddress: string
                    phone: string
                    isPhoneVerified: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
      security:
      - {}
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
      x-internal: true
      x-stoplight:
        id: rig0xbeyjbk8m
    get:
      tags: ["User Onboarding"]
      summary: Get Customers
      description: Fetches list of all customers. Can be filtered by passing `customerId`
      operationId: get-customers
      parameters:
      - name: customer_id
        in: query
        description: ID of Customer
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Customer'
      security:
      - ClientToken: []
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
      x-internal: true
      x-stoplight:
        id: v1djgmo1t2c00
  /geo-coverage:
    get:
      tags: ["Coverage"]
      summary: Get Geocoverage
      description: Get list of regions where Sardine is supported, separated by county and state regions
      operationId: get-geo
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    minItems: 1
                    uniqueItems: true
                    items:
                      type: object
                      properties:
                        countryCode:
                          type: string
                          description: 2 letter code representing a country
                          minLength: 1
                        isAllowedOnRamp:
                          type: boolean
                          description: Indicates if Sardine Onramp supports this country
                        isAllowedNFT:
                          type: boolean
                          description: Indicates if Sardine NFT supports this country
                        isBasicKycRequired:
                          type: array
                          description: KYC requirements are satisfied without needing a document proof
                          items:
                            type: string
                            enum:
                            - OnRamp
                            - OffRamp
                            - NFT
                        isSsnRequired:
                          type: array
                          description: KYC requirements include SSN verification
                          items:
                            type: string
                            enum:
                            - OnRamp
                            - OffRamp
                            - NFT
                        name:
                          type: string
                          description: Full country name
                          minLength: 1
                        supportedDocuments:
                          type: array
                          description: Type of documents that are supported
                          items:
                            type: string
                            enum:
                            - passport
                            - drivers_license
                            - identity_card
                        currencyCode:
                          type: string
                          description: Currency code for this country
                          minLength: 1
                        otpMethod:
                          type: string
                          enum:
                          - sms
                          - email
                          description: OTP method used for this country
                        paymentMethods:
                          type: array
                          minItems: 1
                          uniqueItems: true
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                description: Supported payment method name
                                minLength: 1
                              type:
                                type: string
                                enum:
                                - card
                                - bank
                                description: Supported payment method type
                              subType:
                                type: string
                                enum:
                                - credit
                                - debit
                                - ach
                                description: Supported payment method subtype
                              subTypes:
                                type: string
                                enum:
                                - us_credit
                                - us_debit
                                - ach
                                - international_credit
                                - international_debit
                                description: Supported payment method subtypes
                              isAllowedOnRamp:
                                type: boolean
                                description: Indicates if the payment method is support for Sardine Onramp
                              isAllowedNFT:
                                type: boolean
                                description: Indicates if the payment method is support for Sardine NFT
                        states:
                          type: array
                          items:
                            type: object
                            properties:
                              code:
                                type: string
                                description: Supported state code
                              name:
                                type: string
                                description: Supported state full name
                              isAllowedOnRamp:
                                type: boolean
                                description: Indicates if the state is supported for Sardine OnRamp
                              isAllowedNFT:
                                type: boolean
                                description: Indicates if the state is supported for Sardine NFT
                        isPayrollSupported:
                          type: boolean
                          description: Indicates if this country is support for Sardine Payroll
                x-examples:
                  example-1:
                    response:
                    - alpha2: DZ
                      alpha3: DZA
                      isAllowed: true
                      isLightKycAllowed: true
                      name: Algeria
                      supportedDocuments:
                      - passport
                      currencyCode: DZD
                      partners:
                      - name: wyre
                        isCardPayment: true
                        currencyCode: USD
      security:
      - ClientToken: []
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
      x-stoplight:
        id: q4xtlw8li6jvk
  /fiat-currencies:
    get:
      tags: ["Coverage"]
      summary: Get Fiat Currencies
      description: List of fiat currencies supported by Sardine
      operationId: get-trade-get-fiat-currencies
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  response:
                    type: object
                    properties:
                      symbol:
                        type: string
                        description: 3 letter symbol of fiat currency
                      supportingCountries:
                        type: array
                        description: 2 letter ISO code for countries
                        items:
                          type: string
                      name:
                        type: string
                        description: Name of currency
                      paymentOptions:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Name of payment method
                            id:
                              type: string
                            processingTime:
                              type: string
                            displayText:
                              type: boolean
                            icon:
                              type: string
                            dailyLimit:
                              type: integer
                              description: Amount of crypto that can be purchased daily
                            maxAmount:
                              type: integer
                              description: The maximum size of the transaction
                            minAmount:
                              type: integer
                              description: The minimum size of transaction
                            weeklyLImit:
                              type: integer
                x-examples:
                  example-1:
                    response:
                      symbol: USD
                      supportingCountries:
                      - US
                      name: US Dollar
                      paymentOptions:
                      - name: ACH
                        id: '1'
                        processingTime: Instant - 3 days
                        displayText: true
                        icon: string
                        dailyLimit: 300000
                        maxAmount: 300000
                        minAmount: 5000
                      isAllowed: true
                      defaultAmount: 20000
                      icon: string
      security:
      - ClientToken: []
      servers:
      - url: https://api.sandbox.sardine.ai/v1
        description: Sandbox
      - url: https://api.sardine.ai/v1
        description: Prod Server
      x-stoplight:
        id: gyxoc9q9sc3uq
  /kyc/widgetUrl:
    get:
      tags: ["User Onboarding"]
      summary: Get KYC Widget URL
      description: This endpoint returns a URL that redirects the user to perform document-based KYC verification.
      operationId: get-kyc-widget-url
      parameters:
        - name: userId
          in: query
          description: The ID of the user for whom the KYC URL is being requested
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response with KYC redirect URL
          content:
            application/json:
              schema:
                type: object
                properties:
                  kycUrl:
                    type: string
                    description: URL to redirect the user to complete KYC
                    format: uri
              examples:
                example-1:
                  value:
                    kycUrl: https://kyc-widget.sardine.ai/start?sessionId=abc123
      security: []
      servers:
        - url: https://api.sandbox.sardine.ai/v1
          description: Sandbox
        - url: https://api.sardine.ai/v1
          description: Prod Server
  /payment-methods/widgetUrl:
    get:
      tags: ["Payment Method"]
      summary: Get Add Fiat Account Widget URL
      description: This endpoint returns a URL where users can be redirected to connect external fiat payment methods, including credit/debit cards, bank accounts, and SEPA.
      operationId: get-fiat-account-widget-url
      parameters:
        - name: userId
          in: query
          description: The ID of the user for whom the fiat account connection URL is being requested
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response with fiat account connection URL
          content:
            application/json:
              schema:
                type: object
                properties:
                  addFiatAccountUrl:
                    type: string
                    description: URL to redirect the user to connect a fiat payment method
                    format: uri
              examples:
                example-1:
                  value:
                    addFiatAccountUrl: https://connect-fiat.sardine.ai/start?sessionId=xyz789
      security: []
      servers:
        - url: https://api.sandbox.sardine.ai/v1
          description: Sandbox
        - url: https://api.sardine.ai/v1
          description: Prod Server
  /supportTickets:
    post:
      tags: ["Support"]
      summary: Create Support Ticket
      description: This endpoint allows users to file a support ticket with Sardine by providing their contact information and details about the issue.
      operationId: create-support-ticket
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - userId
                - issueType
                - message
              properties:
                email:
                  type: string
                  format: email
                  description: User's contact email
                userId:
                  type: string
                  description: ID of the user submitting the support request
                issueType:
                  type: string
                  description: Category or type of issue
                  enum:
                    - account_issue
                    - payment_problem
                    - kyc_question
                    - other
                message:
                  type: string
                  description: Description of the issue or question
            examples:
              example-1:
                value:
                  email: user@example.com
                  userId: abc123
                  issueType: payment_problem
                  message: I was charged twice for the same transaction.
      responses:
        '200':
          description: Support ticket successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  ticketId:
                    type: string
                    description: Unique identifier for the support ticket
                  createdAt:
                    type: string
                    format: date-time
                    description: Timestamp when the ticket was created
              examples:
                example-1:
                  value:
                    ticketId: STK-20250417-001
                    createdAt: "2025-04-17T14:30:00Z"
  /onramp:
    post:
      tags: ["Order Execution"]
      summary: Create Onramp Order
      description: This endpoint is used to initiate an onramp transaction, converting fiat to crypto and delivering the crypto to a destination wallet.
      operationId: create-onramp-order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - userId
                - fromCurrency
                - toCurrency
                - amount
                - chain
                - paymentMethodId
                - depositAddress
              properties:
                userId:
                  type: string
                  description: ID of the user placing the onramp order
                fromCurrency:
                  type: string
                  description: The fiat currency the user is paying with (e.g., USD)
                toCurrency:
                  type: string
                  description: The cryptocurrency to be delivered (e.g., ETH)
                amount:
                  type: number
                  description: Amount in fiat currency to convert
                chain:
                  type: string
                  description: Blockchain network to use (e.g., ethereum, polygon)
                paymentMethodId:
                  type: string
                  description: ID of the user's selected payment method
                depositAddress:
                  type: string
                  description: Wallet address where the crypto will be delivered
            examples:
              example-1:
                value:
                  userId: abc123
                  fromCurrency: USD
                  toCurrency: ETH
                  amount: 100
                  chain: ethereum
                  paymentMethodId: pay-987654321
                  depositAddress: 0xabc123def456ghi789jkl000mno111pqrs222tuv
      responses:
        '200':
          description: Onramp order successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    type: string
                    description: Unique identifier for the onramp order
                  status:
                    type: string
                    description: Current status of the order (e.g., pending, completed)
                  estimatedDelivery:
                    type: string
                    format: date-time
                    description: Estimated delivery time for crypto
              examples:
                example-1:
                  value:
                    orderId: ONR-20250417-001
                    status: pending
                    estimatedDelivery: "2025-04-17T15:45:00Z"
  /offramp:
    post:
      tags: ["Order Execution"]
      summary: Create Offramp Order
      description: This endpoint is used to initiate an offramp transaction, converting crypto to fiat and transferring funds to the user's connected payment method.
      operationId: create-offramp-order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - userId
                - fromCurrency
                - toCurrency
                - amount
                - chain
                - paymentMethodId
                - withdrawalAddress
              properties:
                userId:
                  type: string
                  description: ID of the user placing the offramp order
                fromCurrency:
                  type: string
                  description: The cryptocurrency being sold (e.g., ETH)
                toCurrency:
                  type: string
                  description: The fiat currency to be received (e.g., USD)
                amount:
                  type: number
                  description: Amount of crypto to convert
                chain:
                  type: string
                  description: Blockchain network of the crypto (e.g., ethereum, polygon)
                paymentMethodId:
                  type: string
                  description: ID of the user’s fiat withdrawal method (e.g., bank or card)
                withdrawalAddress:
                  type: string
                  description: Wallet address from which the crypto will be sent
            examples:
              example-1:
                value:
                  userId: abc123
                  fromCurrency: ETH
                  toCurrency: USD
                  amount: 0.05
                  chain: ethereum
                  paymentMethodId: pay-987654321
                  withdrawalAddress: 0xabc123def456ghi789jkl000mno111pqrs222tuv
      responses:
        '200':
          description: Offramp order successfully created
          content:
            application/json:
              schema:
                type: object
                properties:
                  orderId:
                    type: string
                    description: Unique identifier for the offramp order
                  status:
                    type: string
                    description: Current status of the order (e.g., pending, completed)
                  estimatedPayout:
                    type: string
                    format: date-time
                    description: Estimated time when fiat will be delivered
              examples:
                example-1:
                  value:
                    orderId: OFF-20250417-001
                    status: pending
                    estimatedPayout: "2025-04-17T18:00:00Z"
components:
  securitySchemes:
    ClientToken:
      type: http
      scheme: basic
  schemas:
    Trade:
      type: object
      title: Trade
      description: "Currently, only `usd` is supported for `fiat_type`, with more currency types coming soon. \n\nYou can see\
        \ list of all supported currencies for `asset_type` [here](https://sardineai.stoplight.io/docs/crypto-on-ramp/ZG9jOjQyODg0NjQ3-supported-tokens)"
      properties:
        tradeId:
          type: string
          description: Unique ID of trade
          format: uuid
          minLength: 1
        networkFee:
          type: number
          description: Fees paid to the blockchain network to validate the transaction
        transactionFee:
          type: number
          description: Processing fees charged by Sardine to the user, and split with the merchant
        createdAt:
          type: string
          description: Timestamp of transaction
          format: date-time
        network:
          type: string
          description: Blockchain on which the transaction took place
        status:
          type: string
          enum:
          - completed
          - pending
          description: 'Transaction status. '
        txHash:
          type: string
          description: Hash of transaction
        total:
          type: number
          description: Total amount spent in transaction
        assetType:
          type: string
          description: 'Type of digital currency being bought. '
        assetPrice:
          type: number
          description: Price for 1 unit of the digital token
        assetQuantity:
          type: number
          description: Quantity of digital assets bought
        assetTotal:
          type: number
          description: 'Total value of destination asset purchased. '
        paymentMethodId:
          type: string
          description: ID of Bank account used in the transaction
          format: uuid
          minLength: 1
        walletId:
          type: string
          format: uuid
        onchainTxnStatus:
          type: string
          enum:
          - pending
          - settled
          - hold
          description: 'On chain status of transaction

            `settled` - transaction is confirmed on the chain, check `tx_hash` for confirmation hash

            `pending` - transaction is awaiting validation on the chain

            `hold` - transaction hasn''t been initiated yet

            `'
        buyOrSell:
          type: string
          description: 'Set to `buy` if buying crypto with fiat, and `sell` when selling crypto to obtain fiat. '
      x-examples:
        example-1:
          trade_id: uix67632673
          buy_or_sell: buy
          bank_name: Bank of America
          network_fee_minor_units: 103
          transaction_fee_minor_units: 50
          fiat_amount_minior_units: 1000
          asset_type: ETH
          asset_quantity: 0.25
          address: '0x123'
          bank_account_id: uuid4
      x-stoplight:
        id: tfd4mhhtjmcfp
    Quote:
      type: object
      properties:
        quantity:
          type: number
          description: Amount of crypto that will be purchased
        price:
          type: number
          description: Price for 1 unit of the crypto being bought
        subtotal:
          type: integer
          description: Fiat value of the crypto that the user will receive, net of fees
        transactionFee:
          type: integer
          description: Also known as "gas", the fees paid to validators on the network
        networkFee:
          type: integer
          description: Fees paid to Sardine for processing the trade
        total:
          type: number
          description: Total cost incurred by the user
        assetType:
          type: string
        network:
          type: string
        expiresIn:
          type: string
      x-examples:
        example-1:
          quantity: 0.0445225
          price: 2111.2920433488684
          subtotal: 9400
          transactionFee: 200
          networkFee: 400
          total: 10000
          assetType: ETH
          network: ethereum
      x-stoplight:
        id: fapqrxk5xzh7c
    BankAccount:
      type: object
      title: Bank Account
      properties:
        bankAccountId:
          type: string
          description: Unique identifier for the given user.
          format: uuid
        accountNumber:
          type: string
          description: 'Bank account number

            '
        name:
          type: string
          description: User set name of account
          format: email
        officialName:
          type: string
          description: Bank designated name of account
          format: date
        routingNumber:
          type: string
          description: The date that the user was created.
          format: date
        subtype:
          type: string
          description: Subtype of account
        type:
          type: string
          description: Type of account, checking, saving etc
        wireRoutingNUmber:
          type: string
          description: Routing number for bank account
        institutionName:
          type: string
          description: Name of the bank at which the account is open
        status:
          type: string
          enum:
          - connected
          - disconnected
      x-stoplight:
        id: 5n26ty6etq5zy
    Customer:
      type: object
      title: Customer
      properties:
        sessionKey:
          type: string
          minLength: 1
        level:
          type: string
          enum:
          - low
          - medium
          - high
          - very_high
          description: This is the ONLY field that a merchant needs to use to make decision on fraud. This field is set by
            our rules and the main rule is the rule using our "customer score" model.
          minLength: 1
        status:
          type: string
          enum:
          - Success
          - Failure
          minLength: 1
        customer:
          type: object
          properties:
            score:
              type: number
              description: ML Risk Score for the current customer session. The ML model used to predict the score is trained
                on velocity and aggregation features, phone, email, bank, tax, card, IP, location, device and behavior intelligence
                signals. The score can be used once feedback for historical transactions has been provided.
            level:
              type: string
              enum:
              - low
              - medium
              - high
              - very_high
              description: This field is based on the signals sent in the response.
              minLength: 1
            signals:
              type: array
              description: See https://docs.sardine.ai/api/reference/operation/v1-customers/
              minItems: 1
              uniqueItems: true
              items:
                type: object
                properties:
                  key:
                    type: string
                    minLength: 1
                  value:
                    type: string
                    minLength: 1
        transaction:
          type: object
          properties:
            level:
              type: string
              enum:
              - low
              - medium
              - high
              description: transaction risk level
              minLength: 1
            amlLevel:
              type: string
              enum:
              - low
              - medium
              - high
              description: aml risk level
              minLength: 1
            indemnification:
              type: object
              properties:
                decision:
                  type: string
                  enum:
                  - approved
                  - conditionally_approved
                  - rejected
                  - unknown
                  minLength: 1
                instantLimit:
                  type: number
                  description: This is the withdrawal amount in cents that is immediately available to the end-user. The remaining
                    hold amount should be kept on hold on your side until the time specified by holdTime parameter below.
                holdAmount:
                  type: number
                  description: This is the remaining amount in cents that is available after the hold time is over. The hold
                    time + instantLimit is the total deposit amount.
                verificationCode:
                  type: string
                  minLength: 1
                holdTime:
                  type: string
                  description: UNIX timestamp that represents time until you which should hold part of fund
                  format: time
      x-examples:
        example-1:
          sessionKey: string
          level: string
          status: string
          customer:
            score: 0
            level: string
            signals:
            - key: string
              value: string
          transaction:
            level: string
            amlLevel: string
            indemnification:
              decision: string
              instantLimit: 0
              holdAmount: 0
              verificationCode: string
          checkpoints:
            customer:
              customerPurchaseLevel:
                value: string
                ruleIds:
                - {}
              emailLevel:
                value: string
                ruleIds:
                - {}
              historicalLevel:
                value: string
                ruleIds:
                - {}
              riskLevel:
                value: string
                ruleIds:
                - {}
