openapi: 3.1.0
x-stoplight:
  id: eku45lj2gg4ym
info:
  title: DedicatedAddresses
  version: '1.0'
  description: API documentation
  contact:
    name: admin
servers:
  - url: https://api.coinsflow.pl
  - url: https://api.sandbox.coinsflow.pl
    description: ''
paths:
  /wallets:
    parameters: []
    post:
      summary: Wallet create
      operationId: post-users-userId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Wallet'
      tags:
        - addresses
      description: >-
        This call allows you to create a dedicated address.<br><br>Note: Due to
        rare timeouts for larger numbers of requests, we strongly recommend a
        "retry logic" to be present
      requestBody:
        $ref: '#/components/requestBodies/Wallet'
    get:
      summary: Wallet list
      operationId: get-wallets
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Wallet'
      tags:
        - addresses
      description: >-
        List of dedicated wallets attached to the current project<br><br>Note:
        Due to rare timeouts for larger numbers of requests, we strongly
        recommend a "retry logic" to be present
components:
  schemas:
    Asset:
      type: object
      x-examples:
        Example 1:
          id: a0dc8d1e-7d1e-421a-ba99-db625459bd64
          name: Ethereum Test
          symbol: ETH_TEST
          displayName: Ethereum Test
          displaySymbol: ETH_TEST
          exchangeSymbol: ETH
          type: CRYPTO
          subType: BASE_ASSET
          token: false
          contract: null
          nativeAsset: ETH_TEST3
          decimals: 18
          network: ETH_TEST3
      properties:
        id:
          type: string
          description: >-
            This parameter displays the unique code that identifies the crypto
            currency.
          format: uuid
        name:
          type: string
          description: This parameter displays the name given to the crypto currency.
        symbol:
          type: string
          description: >-
            This parameter displays the symbol associated to the crypto
            currency.
        displayName:
          type: string
          description: This paramater displays the name of the cryptocurrency.
        displaySymbol:
          type: string
          description: >-
            This paramater displays the symbol that identifies the
            cryptocurrency.
        exchangeSymbol:
          type: string
          description: >-
            This parameter displays the id that identifies the exchange provider
            of the crypto currency.
        type:
          type: string
          description: This paramater displays the type of asset (fiat or crypto).
        subType:
          type: string
          description: This paramater displays the subtype of asset (token or based asset).
        token:
          type: boolean
          description: This paramater displays the if the asset is a token or not.
        contract:
          type: 'null'
          description: >-
            This parameter displays the unique code that identifies the crypto
            currency's contract.
        nativeAsset:
          type: string
          description: >-
            This parameter displays the base asset of the blockchain (e.g.: USDT
            on Ethereum network is USDT asset and ETH base asset).
        decimals:
          type: integer
          description: >-
            This parameter displays the amount of decimals acepted by the crypto
            currency.
        network:
          type: string
          description: >-
            This parameter displays the network where the crypto currency is
            available.
    Wallet:
      type: object
      x-examples:
        Example 1:
          id: b763a491-3ca3-4fe0-b14e-5c87f201967b
          asset:
            id: c21f664c-d2a1-4b41-9564-25e3dcde497c
            name: Litecoin Test
            symbol: LTC_TEST
            displayName: Litecoin Test
            displaySymbol: LTC_TEST
            exchangeSymbol: LTC
            type: CRYPTO
            subType: BASE_ASSET
            token: false
            contract: null
            nativeAsset: LTC_TEST
            decimals: 8
            network: LTC_TEST
          address: tltc1qar05t4myq978esl36mv7ca3c6czmzq57azymkz
          createdAt: '2023-09-13T13:29:32+00:00'
      description: Wallet object
      title: Wallet
      properties:
        id:
          type: string
          description: This parameter displays the unique code that identifies the wallet.
          format: uuid
        asset:
          $ref: '#/components/schemas/Asset'
          description: Asset object
        address:
          type: string
          description: >-
            This parameter displays the unique code that identifies the location
            of the wallet.
        tag:
          type: string
          description: >-
            This parameter allows you to insert the unique numerical code,
            required by some blockchains, to pair with the deposit address, as
            an additional Security measure (If the Asset requires it, a value is
            displayed, otherwise it is “null”).
        createdAt:
          type: string
          description: This parameter displays the date and time the wallet was created.
          format: date-time
    WalletBalance:
      title: WalletBalance
      x-stoplight:
        id: d405ct1nyz97w
      type: object
      examples:
        - id: 3faafb38-619d-4cee-bc3c-0b5f3f1b4bd8
          wallet:
            id: 2750a4db-cbd6-49a7-9d90-a45ef15c7f49
            address: '0xFb847dd9dC091071865CdE66dA759dFe13eEBAB1'
            createdAt: '2023-09-07T14:46:50+00:00'
          asset:
            id: 8872273c-f1be-4d88-ae04-75faddbdeb5f
            name: Ethereum Test (Goerli)
            symbol: ETH_TEST3
            displayName: Ethereum Test (Goerli)
            displaySymbol: ETH_TEST3
            exchangeSymbol: ETH
            type: CRYPTO
            subType: BASE_ASSET
            token: false
            contract: null
            nativeAsset: ETH_TEST3
            decimals: 18
            network: ETH_TEST3
          available: '0.010000000000000000'
          deposit: '0.010000000000000000'
          depositFee: '0.000000000000000000'
          network: 120
          createdAt: '2023-09-29T04:59:29+00:00'
          updatedAt: null
      properties:
        id:
          type: string
          format: uuid
          description: >-
            This parameter displays the unique code that identifies the
            operation that changed the balance.
        wallet:
          $ref: '#/components/schemas/WalletShort'
        asset:
          $ref: '#/components/schemas/Asset'
        available:
          type: string
          description: >-
            This parameter displays the amount available of the crypto currency
            associated with the balance.
        deposit:
          type: string
          description: This parameter displays the amout deposited.
        depositFee:
          type: string
          description: This parameter displays the amout charged as fee.
        network:
          type: string
          description: >-
            This parameter displays the network where the crypto currency is
            available.
        createdAt:
          type: string
          description: >-
            This parameter displays the date and time the operation was created
            that changed the balance.
        updatedAt:
          type: string
          description: >-
            This parameter displays the date and time the operation was updated
            that changed the balance.
    WalletShort:
      type: object
      x-examples:
        Example 1:
          id: 2750a4db-cbd6-49a7-9d90-a45ef15c7f49
          address: '0xFb847dd9dC091071865CdE66dA759dFe13eEBAB1'
          createdAt: '2023-09-07T14:46:50+00:00'
      properties:
        id:
          type: string
          description: This parameter displays the unique code that identifies the wallet.
        address:
          type: string
          description: >-
            This parameter displays the unique code that identifies the location
            of the wallet.
        createdAt:
          type: string
          description: This parameter displays the date and time the wallet was created.
    WalletBalanceLog:
      title: WalletBalanceLog
      x-stoplight:
        id: 23k52wjx2o6py
      type: object
      examples:
        - id: 189f418a-0009-4712-949b-494ffc09cbe0
          wallet:
            id: 3f1855b1-7652-4967-9cb2-a4f1529b9020
            address: '0xFb847dd9dC091071865CdE66dA759dFe13eEBAB1'
            createdAt: '2023-09-07T14:46:50+00:00'
          asset:
            id: a9a9c419-f66c-47fc-9e94-8f027bb073d7
            name: Ethereum Test (Goerli)
            symbol: ETH_TEST3
            displayName: Ethereum Test (Goerli)
            displaySymbol: ETH_TEST3
            exchangeSymbol: ETH
            type: CRYPTO
            subType: BASE_ASSET
            token: false
            contract: null
            nativeAsset: ETH_TEST3
            decimals: 18
            network: ETH_TEST3
          amount: '0.010000000000000000'
          amountUsd: '16.510000000000000000'
          fee: '0.000000000000000000'
          balanceBefore: '0.000000000000000000'
          balanceAfter: '0.010000000000000000'
          type: DEPOSIT
          network: ETH_TEST3
          createdAt: '2023-09-29T04:59:29+00:00'
      properties:
        id:
          type: string
          format: uuid
          description: >-
            This parameter displays the unique code that identifies the wallaet
            balance log.
        wallet:
          $ref: '#/components/schemas/WalletShort'
        asset:
          $ref: '#/components/schemas/Asset'
        amount:
          type: string
          description: >-
            This parameter displays the amount of the crypto currency used on
            the transaction.
        amountUsd:
          type: string
          description: This parameter displays the amount in USD used on the transaction.
        fee:
          type: string
          description: >-
            This parameter displays the amount charged as fee on the
            transaction.
        balanceBefore:
          type: string
          description: >-
            This parameter displays the balance of the crypto currency before
            the transaction occurred.
        balanceAfter:
          type: string
          description: >-
            This parameter displays the balance of the crypto currency after the
            transaction occurred.
        type:
          type: string
          enum:
            - DEPOSIT
            - WITHDRAW
            - INCOMING_EXCHANGE
            - OUTGOING_EXCHANGE
            - TOP_UP
            - TYPE_VIRTUAL_WITHDRAW
          description: >-
            This parameter displays the type of transaction that occurred
            (deposit, withdraw, exchanging to, exchanging from, top up or
            virtual withdraw).
        network:
          type: string
          description: This parameter displays the network where the transaction occurred.
        createdAt:
          type: string
          description: >-
            This parameter displays the date and time when the transaction
            occurred.
  securitySchemes:
    HMAC:
      name: Authorization contains username algorithm headers signature
      type: apiKey
      in: header
  requestBodies:
    Wallet:
      content:
        application/json:
          schema:
            type: object
            required:
              - asset
            properties:
              asset:
                type: string
                format: uuid
                description: >-
                  This parameter indicates the unique code that identifies the
                  asset.
              unique:
                type: boolean
                default: false
                description: >-
                  This parameter, set as `false` by default, if set to `true`,
                  creates a new dedicated wallet address every time the Wallet
                  create endpoint is called (keep in mind that with the
                  parameter set to `false`, if you request 2 dedicated addresses
                  in a row, for different assets that belong in the same network
                  - ETH and USDC, on the ETH chain, for example - the same
                  address is provided, since the assets are from the same
                  network and only the combination of the address and the asset
                  is unique).
      description: ''
security:
  - HMAC: []
tags:
  - name: addresses
