openapi: 3.0.0
servers:
  - url: https://eu.eth.chaingateway.io/v1
    variables: {}
info:
  contact: {}
  description: |-
    # Chaingateway.io

    REST API to build the bridge between Ethereum and the real world

    Please check out our [website](https://chaingateway.io?utm_source=postman) for detailed information about this API.

    To use our API, you need an API Key (Described as Authorization header in the examples below).
    To get one, please create an account on our [website](https://chaingateway.io/register?utm_source=postman).

    For our internal documentation, please check out our [Docs Site](https://chaingateway.io/docs?utm_source=postman).

    If you need help with integrating our API in your application, you can reach us via [email](mailto:support@chaingateway.io) or join our official [Telegram](https://t.me/chaingateway) group.
  title: Chaingateway.io
  version: "1.0"
  x-apisguru-categories:
    - financial
  x-origin:
    - format: openapi
      url: https://chaingateway.io/downloads/openapiv3.json
      version: "3.0"
  x-providerName: chaingateway.io
  x-preferred: false
tags:
  - description: Requests that return information on balances, transactions, gas price, exchange rates, ...
    name: Info Requests
  - description: Requests to create, list and delete addresses
    name: Address Requests
  - description: Requests for creating, deleting and listing existing subscriptions
    name: Subscription/IPN Requests
  - description: Requests to send Tokens, Ethereum and clear addresses
    name: Transaction Requests
paths:
  /clearAddress:
    post:
      deprecated: false
      description: Sends all available ethereum funds of an address to a specified receiver address.
      operationId: clearAddress
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              ethereumaddress: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
              newaddress: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
              password: padN39QkRA2hJ
            schema:
              $ref: "#/components/schemas/clearAddressRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                amount: 0.02300916225
                ethereumaddress: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
                gas: 0.0025199999999999997
                newaddress: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
                ok: true
                total: "0.025529162250000000"
                txid: "0xcff06775098019d18f7bab6a350c18e86f89399db63cbce5269104e6c9a79499"
              schema:
                $ref: "#/components/schemas/clearAddress"
          description: ""
          headers: {}
      security: []
      summary: clearAddress
      tags:
        - Transaction Requests
  /deleteAddress:
    post:
      deprecated: false
      description: Deletes an existing ethereum address. Be careful when using this function.
      operationId: deleteAddress
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              ethereumaddress: "0x71892689ed0d79d88ab6ea3783b571b8ece9bee3"
              password: padN39QkRA2hJ
            schema:
              $ref: "#/components/schemas/deleteAddressRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                deleted: true
                ethereumaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
                ok: true
              schema:
                $ref: "#/components/schemas/deleteAddress"
          description: ""
          headers: {}
      security: []
      summary: deleteAddress
      tags:
        - Address Requests
  /exportAddress:
    post:
      deprecated: false
      description: Returns all ethereum addresses created with an account.
      operationId: exportAddress
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              ethaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
              password: padN39QkRA2hJ
            schema:
              $ref: "#/components/schemas/exportAddressRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                content: "{'version':3,'id':'85b790ff-408e-42b8-b123-bec9523964dc','address':'71892889ed4d79d88ab6ea3783b571b8ece9bef4','crypto':{'ciphertext':'9d74262517b984f9b0560b8f23b5e3340f7be0f56b70cd91ff445dcaf5b1968f','cipherparams':{'iv':'76e6f2497b9f2a8e024fc752a5418a6d'},'cipher':'aes-128-ctr','kdf':'scrypt','kdfparams':{'dklen':32,'salt':'d11d996a7cc4bfad730d4c9b9057eff2c0fb3940b5bfc59db62ae218c14a54f4','n':131072,'r':8,'p':1},'mac':'dcc342bbbbb8eea97c89b47bafc23de568fc1a48e0bd21ae8d776a95c4704ac9'}}"
                filename: UTC--2020-09-19T10-42-26.196Z--71892889ed4d79d88ab6ea3783b571b8ece9bef4
                ok: true
              schema:
                $ref: "#/components/schemas/exportAddress"
          description: ""
          headers: {}
      security: []
      summary: exportAddress
      tags:
        - Address Requests
  /getBlock:
    post:
      deprecated: false
      description: Returns information of an ethereum block with or without transactions
      operationId: getBlock
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              block: "5000000"
            schema:
              $ref: "#/components/schemas/getBlockRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                block_number: "5000000"
                difficulty: "2546613975853490"
                gas_limit: "8000029"
                gas_used: "7994053"
                hash: "0x7d5a4369273c723454ac137f48a4f142b097aa2779464e6505f1b1c5e37b5382"
                miner: "0xb2930B35844a230f00E51431aCAe96Fe543a0347"
                ok: true
                parent_hash: "0xcae4df80f5862e4321690857eded0d8a40136dafb8155453920bade5bd0c46c0"
                size_in_bytes: "24017"
                time_stamp: 2018-01-30 14:41:33
                transactions_count: "109"
              schema:
                $ref: "#/components/schemas/getBlock"
          description: ""
          headers: {}
      security: []
      summary: getBlock
      tags:
        - Info Requests
  /getEthereumBalance:
    post:
      deprecated: false
      description: Returns the ethereum balance of a given address.
      operationId: getEthereumBalance
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              ethereumaddress: "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"
            schema:
              $ref: "#/components/schemas/getEthereumBalanceRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                balance: 0.009956019840987648
                ethereumaddress: "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"
                ok: true
              schema:
                $ref: "#/components/schemas/getEthereumBalance"
          description: ""
          headers: {}
      security: []
      summary: getEthereumBalance
      tags:
        - Info Requests
  /getExchangeRate:
    post:
      deprecated: false
      description: Returns the current Ethereum price in Euro or US Dollar.
      operationId: getExchangeRate
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              currency: eur
            schema:
              $ref: "#/components/schemas/getExchangeRateRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                currency: eur
                ok: true
                rate: 321.2
              schema:
                $ref: "#/components/schemas/getExchangeRate"
          description: ""
          headers: {}
      security: []
      summary: getExchangeRate
      tags:
        - Info Requests
  /getGasPrice:
    post:
      deprecated: false
      description: Returns the current gas price in GWEI.
      operationId: getGasPrice
      parameters:
        - in: header
          name: Content-Type
          required: true
          schema:
            example: application/json
            type: string
          style: simple
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      responses:
        "200":
          content:
            application/json:
              example:
                gasprice: 70
                ok: true
              schema:
                $ref: "#/components/schemas/getGasPrice"
          description: ""
          headers: {}
      security: []
      summary: getGasPrice
      tags:
        - Info Requests
  /getLastBlockNumber:
    post:
      deprecated: false
      description: Returns the block number of the last mined ethereum block.
      operationId: getLastBlockNumber
      parameters:
        - in: header
          name: Content-Type
          required: true
          schema:
            example: application/json
            type: string
          style: simple
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      responses:
        "200":
          content:
            application/json:
              example:
                blocknumber: 10892021
                ok: true
              schema:
                $ref: "#/components/schemas/getLastBlockNumber"
          description: ""
          headers: {}
      security: []
      summary: getLastBlockNumber
      tags:
        - Info Requests
  /getToken:
    post:
      deprecated: false
      description: Returns information about a specific ERC20 token like name, symbol, decimal places and total supply.
      operationId: getToken
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              contractaddress: "0x5b86a33f0c232fe909eb4602a9d039072869d915"
            schema:
              $ref: "#/components/schemas/getTokenRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                contractaddress: "0x5b86a33f0c232fe909eb4602a9d039072869d915"
                decimals: 2
                name: Bitfranken
                ok: true
                supply: 76507131570
                symbol: BIFRA
              schema:
                $ref: "#/components/schemas/getToken"
          description: ""
          headers: {}
      security: []
      summary: getToken
      tags:
        - Info Requests
  /getTokenBalance:
    post:
      deprecated: false
      description: Returns the token balance of a given address.
      operationId: getTokenBalance
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              contractaddress: "0x5b86a33f0c232fe909eb4602a9d039072869d915"
              ethereumaddress: "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"
            schema:
              $ref: "#/components/schemas/getTokenBalanceRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                balance: 9980
                contractaddress: "0x5b86a33f0c232fe909eb4602a9d039072869d915"
                ethereumaddress: "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"
                ok: true
              schema:
                $ref: "#/components/schemas/getTokenBalance"
          description: ""
          headers: {}
      security: []
      summary: getTokenBalance
      tags:
        - Info Requests
  /getTransactions:
    post:
      deprecated: false
      description: Returns information like confirmations, token contract address, amount, gas price and more of a given transaction.
      operationId: getTransactions
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              txid: "0x8ab5543bc103bdd908681da501d03c2c495afd7fde5ed104935ba97b1550d65b"
            schema:
              $ref: "#/components/schemas/getTransactionsRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                ok: true
                transactions:
                  - amount: "10"
                    block_number: "6432816"
                    contract_address: "0x9E2B71e87d9304c4773674584EB9D0c838643568"
                    from: "0x8dF9654c7D81c850FDd35D93292B2fC60e666bF0"
                    gas: "90000"
                    gas_price: "9"
                    to: "0xbee9422f1b65687d0cb923bbd1fc5ccb9307e861"
                    token_decimals: "18"
                    token_name: Shopiblock
                    token_supply: "1000000000"
                    token_symbol: SHB
                    txid: "0x8ab5543bc103bdd908681da501d03c2c495afd7fde5ed104935ba97b1550d65b"
                    type: ERC20
              schema:
                $ref: "#/components/schemas/getTransactions"
          description: ""
          headers: {}
      security: []
      summary: getTransactions
      tags:
        - Info Requests
  /importAddress:
    post:
      deprecated: false
      description: Returns all ethereum addresses created with an account.
      operationId: importAddress
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              content:
                address: 71892889ed4d79d88ab6ea3783b571b8ece9bef4
                crypto:
                  cipher: aes-128-ctr
                  cipherparams:
                    iv: 76e6f2497b9f2a8e024fc752a5418a6d
                  ciphertext: 9d74262517b984f9b0560b8f23b5e3340f7be0f56b70cd91ff445dcaf5b1968f
                  kdf: scrypt
                  kdfparams:
                    dklen: 32
                    n: 131072
                    p: 1
                    r: 8
                    salt: d11d996a7cc4bfad730d4c9b9057eff2c0fb3940b5bfc59db62ae218c14a54f4
                  mac: dcc342bbbbb8eea97c89b47bafc23de568fc1a48e0bd21ae8d776a95c4704ac9
                id: 85b790ff-408e-42b8-b123-bec9523964dc
                version: 3
              filename: UTC--2020-09-19T10-42-26.196Z--71892889ed4d79d88ab6ea3783b571b8ece9bef4
              password: padN39QkRA2hJ
            schema:
              $ref: "#/components/schemas/importAddressRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                ethaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
                filename: UTC--2020-09-19T10-42-26.196Z--71892889ed4d79d88ab6ea3783b571b8ece9bef4
                ok: true
              schema:
                $ref: "#/components/schemas/importAddress"
          description: ""
          headers: {}
      security: []
      summary: importAddress
      tags:
        - Address Requests
  /listAddresses:
    post:
      deprecated: false
      description: Returns all ethereum addresses created with an account.
      operationId: listAddresses
      parameters:
        - in: header
          name: Content-Type
          required: true
          schema:
            example: application/json
            type: string
          style: simple
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      responses:
        "200":
          content:
            application/json:
              example:
                addresses:
                  - ethereumaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
                ok: true
              schema:
                $ref: "#/components/schemas/listAddresses"
          description: ""
          headers: {}
      security: []
      summary: listAddresses
      tags:
        - Address Requests
  /listFailedIPNs:
    post:
      deprecated: false
      description: Returns all subscriptions/IPNs created with an account.
      operationId: listFailedIPNs
      parameters:
        - in: header
          name: Content-Type
          required: true
          schema:
            example: application/json
            type: string
          style: simple
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      responses:
        "200":
          content:
            application/json:
              example:
                failed_ipns:
                  - action: deposit
                    amount: "496588.7771277759"
                    contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
                    ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
                    id: "17766"
                    timestamp: 2020-09-19 14:33:01
                    url: https://yoururl.com/ipnreceiver.php
                ok: true
              schema:
                $ref: "#/components/schemas/listFailedIPNs"
          description: ""
          headers: {}
      security: []
      summary: listFailedIPNs
      tags:
        - Subscription/IPN Requests
  /listSubscribedAddresses:
    post:
      deprecated: false
      description: Returns all subscriptions/IPNs created with an account.
      operationId: listSubscribedAddresses
      parameters:
        - in: header
          name: Content-Type
          required: true
          schema:
            example: application/json
            type: string
          style: simple
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      responses:
        "200":
          content:
            application/json:
              example:
                ipns:
                  - contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
                    ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
                    url: https://yoururl.com/ipnreceiver.php
                ok: true
              schema:
                $ref: "#/components/schemas/listSubscribedAddresses"
          description: ""
          headers: {}
      security: []
      summary: listSubscribedAddresses
      tags:
        - Subscription/IPN Requests
  /newAddress:
    post:
      deprecated: false
      description: Generates a new ethereum addresses you can use to send or receive funds. Do not lose the password! We can't restore access to an address if you lose it.
      operationId: newAddress
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              password: padN39QkRA2hJ
            schema:
              $ref: "#/components/schemas/newAddressRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                ethereumaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
                ok: true
                password: padN39QkRA2hJ
              schema:
                $ref: "#/components/schemas/newAddress"
          description: ""
          headers: {}
      security: []
      summary: newAddress
      tags:
        - Address Requests
  /resendFailedIPN:
    post:
      deprecated: false
      description: Returns all subscriptions/IPNs created with an account.
      operationId: resendFailedIPN
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              id: 17766
            schema:
              $ref: "#/components/schemas/resendFailedIPNRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                id: 17766
                ok: true
              schema:
                $ref: "#/components/schemas/resendFailedIPN"
          description: ""
          headers: {}
      security: []
      summary: resendFailedIPN
      tags:
        - Subscription/IPN Requests
  /sendEthereum:
    post:
      deprecated: false
      description: Sends ethereum from an address controlled by the account to a specified receiver address.
      operationId: sendEthereum
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              amount: 0.01
              from: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
              password: padN39QkRA2hJ
              to: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
            schema:
              $ref: "#/components/schemas/sendEthereumRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                amount: "0.010000000000000000"
                from: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
                ok: true
                to: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
                txid: "0xcff06775098019d18f7bab6a350c18e86f89399db63cbce5269104e6c9a79499"
              schema:
                $ref: "#/components/schemas/sendEthereum"
          description: ""
          headers: {}
      security: []
      summary: sendEthereum
      tags:
        - Transaction Requests
  /sendToken:
    post:
      deprecated: false
      description: Sends ERC20 tokens from an address controlled by the account to a specified receiver address. The token contract address is needed to specify the token. The use of the identifier parameter is recommend and awaits an unique string. Whenever a transaction is beeing sent, the identifier is checked and the transaction gets dropped if there is one with that identifier already.
      operationId: sendToken
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              amount: 5
              contractaddress: "0xdac17f958d2ee523a2206206994597c13d831ec7"
              from: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
              identifier: CN562
              password: padN39QkRA2hJ
              to: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
            schema:
              $ref: "#/components/schemas/sendTokenRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                amount: 5
                contractaddress: "0xdac17f958d2ee523a2206206994597c13d831ec7"
                from: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
                identifier: CN562
                ok: true
                to: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
                txid: "0xcff06775098019d18f7bab6a350c18e86f89399db63cbce5269104e6c9a79499"
              schema:
                $ref: "#/components/schemas/sendToken"
          description: ""
          headers: {}
      security: []
      summary: sendToken
      tags:
        - Transaction Requests
  /subscribeAddress:
    post:
      deprecated: false
      description: "Creates a new subscription/IPN for the given address (and contractaddress). You will receive a notification to the given url every time a deposit is received. Unsubscribe the address before sending tokens/ETH from it or you won't get reliable notifications anymore.\r\n"
      operationId: subscribeAddress
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
              ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
              url: https://yoururl.com/ipnreceiver.php
            schema:
              $ref: "#/components/schemas/subscribeAddressRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
                ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
                ok: true
                url: https://yoururl.com/ipnreceiver.php
              schema:
                $ref: "#/components/schemas/subscribeAddress"
          description: ""
          headers: {}
      security: []
      summary: subscribeAddress
      tags:
        - Subscription/IPN Requests
  /unsubscribeAddress:
    post:
      deprecated: false
      description: Deletes an existing subscription/IPN for the given address (and contractaddress).
      operationId: unsubscribeAddress
      parameters:
        - description: API Key
          in: header
          name: Authorization
          required: true
          schema:
            example: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m
            type: string
          style: simple
      requestBody:
        content:
          application/json:
            example:
              contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
              ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
              url: https://yoururl.com/ipnreceiver.php
            schema:
              $ref: "#/components/schemas/unsubscribeAddressRequest"
        required: true
      responses:
        "200":
          content:
            application/json:
              example:
                contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
                deleted: true
                ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
                ok: true
                url: https://yoururl.com/ipnreceiver.php
              schema:
                $ref: "#/components/schemas/unsubscribeAddress"
          description: ""
          headers: {}
      security: []
      summary: unsubscribeAddress
      tags:
        - Subscription/IPN Requests
components:
  schemas:
    Address:
      example:
        ethereumaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
      properties:
        ethereumaddress:
          type: string
      required:
        - ethereumaddress
      title: Address
      type: object
    Cipherparams:
      example:
        iv: 76e6f2497b9f2a8e024fc752a5418a6d
      properties:
        iv:
          type: string
      required:
        - iv
      title: Cipherparams
      type: object
    Content:
      example:
        address: 71892889ed4d79d88ab6ea3783b571b8ece9bef4
        crypto:
          cipher: aes-128-ctr
          cipherparams:
            iv: 76e6f2497b9f2a8e024fc752a5418a6d
          ciphertext: 9d74262517b984f9b0560b8f23b5e3340f7be0f56b70cd91ff445dcaf5b1968f
          kdf: scrypt
          kdfparams:
            dklen: 32
            n: 131072
            p: 1
            r: 8
            salt: d11d996a7cc4bfad730d4c9b9057eff2c0fb3940b5bfc59db62ae218c14a54f4
          mac: dcc342bbbbb8eea97c89b47bafc23de568fc1a48e0bd21ae8d776a95c4704ac9
        id: 85b790ff-408e-42b8-b123-bec9523964dc
        version: 3
      properties:
        address:
          type: string
        crypto:
          $ref: "#/components/schemas/Crypto"
        id:
          type: string
        version:
          format: int32
          type: integer
      required:
        - version
        - id
        - address
        - crypto
      title: Content
      type: object
    Crypto:
      example:
        cipher: aes-128-ctr
        cipherparams:
          iv: 76e6f2497b9f2a8e024fc752a5418a6d
        ciphertext: 9d74262517b984f9b0560b8f23b5e3340f7be0f56b70cd91ff445dcaf5b1968f
        kdf: scrypt
        kdfparams:
          dklen: 32
          n: 131072
          p: 1
          r: 8
          salt: d11d996a7cc4bfad730d4c9b9057eff2c0fb3940b5bfc59db62ae218c14a54f4
        mac: dcc342bbbbb8eea97c89b47bafc23de568fc1a48e0bd21ae8d776a95c4704ac9
      properties:
        cipher:
          type: string
        cipherparams:
          $ref: "#/components/schemas/Cipherparams"
        ciphertext:
          type: string
        kdf:
          type: string
        kdfparams:
          $ref: "#/components/schemas/Kdfparams"
        mac:
          type: string
      required:
        - ciphertext
        - cipherparams
        - cipher
        - kdf
        - kdfparams
        - mac
      title: Crypto
      type: object
    FailedIpn:
      example:
        action: deposit
        amount: "496588.7771277759"
        contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
        ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
        id: "17766"
        timestamp: 2020-09-19 14:33:01
        url: https://yoururl.com/ipnreceiver.php
      properties:
        action:
          type: string
        amount:
          type: string
        contractaddress:
          type: string
        ethereumaddress:
          type: string
        id:
          type: string
        timestamp:
          type: string
        url:
          type: string
      required:
        - id
        - timestamp
        - ethereumaddress
        - contractaddress
        - amount
        - url
        - action
      title: FailedIpn
      type: object
    Ipn:
      example:
        contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
        ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
        url: https://yoururl.com/ipnreceiver.php
      properties:
        contractaddress:
          type: string
        ethereumaddress:
          type: string
        url:
          type: string
      required:
        - ethereumaddress
        - contractaddress
        - url
      title: Ipn
      type: object
    Kdfparams:
      example:
        dklen: 32
        n: 131072
        p: 1
        r: 8
        salt: d11d996a7cc4bfad730d4c9b9057eff2c0fb3940b5bfc59db62ae218c14a54f4
      properties:
        dklen:
          format: int32
          type: integer
        n:
          format: int32
          type: integer
        p:
          format: int32
          type: integer
        r:
          format: int32
          type: integer
        salt:
          type: string
      required:
        - dklen
        - salt
        - n
        - r
        - p
      title: Kdfparams
      type: object
    Transaction:
      example:
        amount: "10"
        block_number: "6432816"
        contract_address: "0x9E2B71e87d9304c4773674584EB9D0c838643568"
        from: "0x8dF9654c7D81c850FDd35D93292B2fC60e666bF0"
        gas: "90000"
        gas_price: "9"
        to: "0xbee9422f1b65687d0cb923bbd1fc5ccb9307e861"
        token_decimals: "18"
        token_name: Shopiblock
        token_supply: "1000000000"
        token_symbol: SHB
        txid: "0x8ab5543bc103bdd908681da501d03c2c495afd7fde5ed104935ba97b1550d65b"
        type: ERC20
      properties:
        amount:
          type: string
        block_number:
          type: string
        contract_address:
          type: string
        from:
          type: string
        gas:
          type: string
        gas_price:
          type: string
        to:
          type: string
        token_decimals:
          type: string
        token_name:
          type: string
        token_supply:
          type: string
        token_symbol:
          type: string
        txid:
          type: string
        type:
          type: string
      required:
        - txid
        - block_number
        - contract_address
        - type
        - token_name
        - token_symbol
        - token_decimals
        - token_supply
        - gas
        - gas_price
        - from
        - to
        - amount
      title: Transaction
      type: object
    clearAddress:
      example:
        amount: 0.02300916225
        ethereumaddress: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
        gas: 0.0025199999999999997
        newaddress: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
        ok: true
        total: "0.025529162250000000"
        txid: "0xcff06775098019d18f7bab6a350c18e86f89399db63cbce5269104e6c9a79499"
      properties:
        amount:
          type: number
        ethereumaddress:
          type: string
        gas:
          type: number
        newaddress:
          type: string
        ok:
          type: boolean
        total:
          type: string
        txid:
          type: string
      required:
        - ok
        - txid
        - ethereumaddress
        - newaddress
        - amount
        - gas
        - total
      title: clearAddress
      type: object
    clearAddressRequest:
      example:
        ethereumaddress: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
        newaddress: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
        password: padN39QkRA2hJ
      properties:
        ethereumaddress:
          type: string
        newaddress:
          type: string
        password:
          type: string
      required:
        - ethereumaddress
        - newaddress
        - password
      title: clearAddressRequest
      type: object
    deleteAddress:
      example:
        deleted: true
        ethereumaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
        ok: true
      properties:
        deleted:
          type: boolean
        ethereumaddress:
          type: string
        ok:
          type: boolean
      required:
        - ok
        - ethereumaddress
        - deleted
      title: deleteAddress
      type: object
    deleteAddressRequest:
      example:
        ethereumaddress: "0x71892689ed0d79d88ab6ea3783b571b8ece9bee3"
        password: padN39QkRA2hJ
      properties:
        ethereumaddress:
          type: string
        password:
          type: string
      required:
        - ethereumaddress
        - password
      title: deleteAddressRequest
      type: object
    exportAddress:
      example:
        content: "{'version':3,'id':'85b790ff-408e-42b8-b123-bec9523964dc','address':'71892889ed4d79d88ab6ea3783b571b8ece9bef4','crypto':{'ciphertext':'9d74262517b984f9b0560b8f23b5e3340f7be0f56b70cd91ff445dcaf5b1968f','cipherparams':{'iv':'76e6f2497b9f2a8e024fc752a5418a6d'},'cipher':'aes-128-ctr','kdf':'scrypt','kdfparams':{'dklen':32,'salt':'d11d996a7cc4bfad730d4c9b9057eff2c0fb3940b5bfc59db62ae218c14a54f4','n':131072,'r':8,'p':1},'mac':'dcc342bbbbb8eea97c89b47bafc23de568fc1a48e0bd21ae8d776a95c4704ac9'}}"
        filename: UTC--2020-09-19T10-42-26.196Z--71892889ed4d79d88ab6ea3783b571b8ece9bef4
        ok: true
      properties:
        content:
          type: string
        filename:
          type: string
        ok:
          type: boolean
      required:
        - ok
        - filename
        - content
      title: exportAddress
      type: object
    exportAddressRequest:
      example:
        ethaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
        password: padN39QkRA2hJ
      properties:
        ethaddress:
          type: string
        password:
          type: string
      required:
        - ethaddress
        - password
      title: exportAddressRequest
      type: object
    getBlock:
      example:
        block_number: "5000000"
        difficulty: "2546613975853490"
        gas_limit: "8000029"
        gas_used: "7994053"
        hash: "0x7d5a4369273c723454ac137f48a4f142b097aa2779464e6505f1b1c5e37b5382"
        miner: "0xb2930B35844a230f00E51431aCAe96Fe543a0347"
        ok: true
        parent_hash: "0xcae4df80f5862e4321690857eded0d8a40136dafb8155453920bade5bd0c46c0"
        size_in_bytes: "24017"
        time_stamp: 2018-01-30 14:41:33
        transactions_count: "109"
      properties:
        block_number:
          type: string
        difficulty:
          type: string
        gas_limit:
          type: string
        gas_used:
          type: string
        hash:
          type: string
        miner:
          type: string
        ok:
          type: boolean
        parent_hash:
          type: string
        size_in_bytes:
          type: string
        time_stamp:
          type: string
        transactions_count:
          type: string
      required:
        - ok
        - hash
        - block_number
        - parent_hash
        - miner
        - difficulty
        - size_in_bytes
        - gas_limit
        - gas_used
        - time_stamp
        - transactions_count
      title: getBlock
      type: object
    getBlockRequest:
      example:
        block: "5000000"
      properties:
        block:
          type: string
      required:
        - block
      title: getBlockRequest
      type: object
    getEthereumBalance:
      example:
        balance: 0.009956019840987648
        ethereumaddress: "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"
        ok: true
      properties:
        balance:
          type: number
        ethereumaddress:
          type: string
        ok:
          type: boolean
      required:
        - ok
        - ethereumaddress
        - balance
      title: getEthereumBalance
      type: object
    getEthereumBalanceRequest:
      example:
        ethereumaddress: "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"
      properties:
        ethereumaddress:
          type: string
      required:
        - ethereumaddress
      title: getEthereumBalanceRequest
      type: object
    getExchangeRate:
      example:
        currency: eur
        ok: true
        rate: 321.2
      properties:
        currency:
          type: string
        ok:
          type: boolean
        rate:
          type: number
      required:
        - ok
        - currency
        - rate
      title: getExchangeRate
      type: object
    getExchangeRateRequest:
      example:
        currency: eur
      properties:
        currency:
          type: string
      required:
        - currency
      title: getExchangeRateRequest
      type: object
    getGasPrice:
      example:
        gasprice: 70
        ok: true
      properties:
        gasprice:
          format: int32
          type: integer
        ok:
          type: boolean
      required:
        - ok
        - gasprice
      title: getGasPrice
      type: object
    getLastBlockNumber:
      example:
        blocknumber: 10892021
        ok: true
      properties:
        blocknumber:
          format: int32
          type: integer
        ok:
          type: boolean
      required:
        - ok
        - blocknumber
      title: getLastBlockNumber
      type: object
    getToken:
      example:
        contractaddress: "0x5b86a33f0c232fe909eb4602a9d039072869d915"
        decimals: 2
        name: Bitfranken
        ok: true
        supply: 76507131570
        symbol: BIFRA
      properties:
        contractaddress:
          type: string
        decimals:
          format: int32
          type: integer
        name:
          type: string
        ok:
          type: boolean
        supply:
          format: int64
          type: integer
        symbol:
          type: string
      required:
        - ok
        - contractaddress
        - name
        - symbol
        - decimals
        - supply
      title: getToken
      type: object
    getTokenBalance:
      example:
        balance: 9980
        contractaddress: "0x5b86a33f0c232fe909eb4602a9d039072869d915"
        ethereumaddress: "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"
        ok: true
      properties:
        balance:
          format: int32
          type: integer
        contractaddress:
          type: string
        ethereumaddress:
          type: string
        ok:
          type: boolean
      required:
        - ok
        - contractaddress
        - ethereumaddress
        - balance
      title: getTokenBalance
      type: object
    getTokenBalanceRequest:
      example:
        contractaddress: "0x5b86a33f0c232fe909eb4602a9d039072869d915"
        ethereumaddress: "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"
      properties:
        contractaddress:
          type: string
        ethereumaddress:
          type: string
      required:
        - contractaddress
        - ethereumaddress
      title: getTokenBalanceRequest
      type: object
    getTokenRequest:
      example:
        contractaddress: "0x5b86a33f0c232fe909eb4602a9d039072869d915"
      properties:
        contractaddress:
          type: string
      required:
        - contractaddress
      title: getTokenRequest
      type: object
    getTransactions:
      example:
        ok: true
        transactions:
          - amount: "10"
            block_number: "6432816"
            contract_address: "0x9E2B71e87d9304c4773674584EB9D0c838643568"
            from: "0x8dF9654c7D81c850FDd35D93292B2fC60e666bF0"
            gas: "90000"
            gas_price: "9"
            to: "0xbee9422f1b65687d0cb923bbd1fc5ccb9307e861"
            token_decimals: "18"
            token_name: Shopiblock
            token_supply: "1000000000"
            token_symbol: SHB
            txid: "0x8ab5543bc103bdd908681da501d03c2c495afd7fde5ed104935ba97b1550d65b"
            type: ERC20
      properties:
        ok:
          type: boolean
        transactions:
          items:
            $ref: "#/components/schemas/Transaction"
          type: array
      required:
        - ok
        - transactions
      title: getTransactions
      type: object
    getTransactionsRequest:
      example:
        txid: "0x8ab5543bc103bdd908681da501d03c2c495afd7fde5ed104935ba97b1550d65b"
      properties:
        txid:
          type: string
      required:
        - txid
      title: getTransactionsRequest
      type: object
    importAddress:
      example:
        ethaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
        filename: UTC--2020-09-19T10-42-26.196Z--71892889ed4d79d88ab6ea3783b571b8ece9bef4
        ok: true
      properties:
        ethaddress:
          type: string
        filename:
          type: string
        ok:
          type: boolean
      required:
        - ok
        - ethaddress
        - filename
      title: importAddress
      type: object
    importAddressRequest:
      example:
        content:
          address: 71892889ed4d79d88ab6ea3783b571b8ece9bef4
          crypto:
            cipher: aes-128-ctr
            cipherparams:
              iv: 76e6f2497b9f2a8e024fc752a5418a6d
            ciphertext: 9d74262517b984f9b0560b8f23b5e3340f7be0f56b70cd91ff445dcaf5b1968f
            kdf: scrypt
            kdfparams:
              dklen: 32
              n: 131072
              p: 1
              r: 8
              salt: d11d996a7cc4bfad730d4c9b9057eff2c0fb3940b5bfc59db62ae218c14a54f4
            mac: dcc342bbbbb8eea97c89b47bafc23de568fc1a48e0bd21ae8d776a95c4704ac9
          id: 85b790ff-408e-42b8-b123-bec9523964dc
          version: 3
        filename: UTC--2020-09-19T10-42-26.196Z--71892889ed4d79d88ab6ea3783b571b8ece9bef4
        password: padN39QkRA2hJ
      properties:
        content:
          $ref: "#/components/schemas/Content"
        filename:
          type: string
        password:
          type: string
      required:
        - filename
        - content
        - password
      title: importAddressRequest
      type: object
    listAddresses:
      example:
        addresses:
          - ethereumaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
        ok: true
      properties:
        addresses:
          items:
            $ref: "#/components/schemas/Address"
          type: array
        ok:
          type: boolean
      required:
        - ok
        - addresses
      title: listAddresses
      type: object
    listFailedIPNs:
      example:
        failed_ipns:
          - action: deposit
            amount: "496588.7771277759"
            contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
            ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
            id: "17766"
            timestamp: 2020-09-19 14:33:01
            url: https://yoururl.com/ipnreceiver.php
        ok: true
      properties:
        failed_ipns:
          items:
            $ref: "#/components/schemas/FailedIpn"
          type: array
        ok:
          type: boolean
      required:
        - ok
        - failed_ipns
      title: listFailedIPNs
      type: object
    listSubscribedAddresses:
      example:
        ipns:
          - contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
            ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
            url: https://yoururl.com/ipnreceiver.php
        ok: true
      properties:
        ipns:
          items:
            $ref: "#/components/schemas/Ipn"
          type: array
        ok:
          type: boolean
      required:
        - ok
        - ipns
      title: listSubscribedAddresses
      type: object
    newAddress:
      example:
        ethereumaddress: "0x71892889ed4d79d88ab6ea3783b571b8ece9bef4"
        ok: true
        password: padN39QkRA2hJ
      properties:
        ethereumaddress:
          type: string
        ok:
          type: boolean
        password:
          type: string
      required:
        - ok
        - ethereumaddress
        - password
      title: newAddress
      type: object
    newAddressRequest:
      example:
        password: padN39QkRA2hJ
      properties:
        password:
          type: string
      required:
        - password
      title: newAddressRequest
      type: object
    resendFailedIPN:
      example:
        id: 17766
        ok: true
      properties:
        id:
          format: int32
          type: integer
        ok:
          type: boolean
      required:
        - ok
        - id
      title: resendFailedIPN
      type: object
    resendFailedIPNRequest:
      example:
        id: 17766
      properties:
        id:
          format: int32
          type: integer
      required:
        - id
      title: resendFailedIPNRequest
      type: object
    sendEthereum:
      example:
        amount: "0.010000000000000000"
        from: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
        ok: true
        to: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
        txid: "0xcff06775098019d18f7bab6a350c18e86f89399db63cbce5269104e6c9a79499"
      properties:
        amount:
          type: string
        from:
          type: string
        ok:
          type: boolean
        to:
          type: string
        txid:
          type: string
      required:
        - ok
        - txid
        - from
        - to
        - amount
      title: sendEthereum
      type: object
    sendEthereumRequest:
      example:
        amount: 0.01
        from: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
        password: padN39QkRA2hJ
        to: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
      properties:
        amount:
          type: number
        from:
          type: string
        password:
          type: string
        to:
          type: string
      required:
        - from
        - to
        - password
        - amount
      title: sendEthereumRequest
      type: object
    sendToken:
      example:
        amount: 5
        contractaddress: "0xdac17f958d2ee523a2206206994597c13d831ec7"
        from: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
        identifier: CN562
        ok: true
        to: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
        txid: "0xcff06775098019d18f7bab6a350c18e86f89399db63cbce5269104e6c9a79499"
      properties:
        amount:
          format: int32
          type: integer
        contractaddress:
          type: string
        from:
          type: string
        identifier:
          type: string
        ok:
          type: boolean
        to:
          type: string
        txid:
          type: string
      required:
        - ok
        - identifier
        - txid
        - contractaddress
        - from
        - to
        - amount
      title: sendToken
      type: object
    sendTokenRequest:
      example:
        amount: 5
        contractaddress: "0xdac17f958d2ee523a2206206994597c13d831ec7"
        from: "0x3a32c4c31fe8d2a89976af5d284a94a040b44aa8"
        identifier: CN562
        password: padN39QkRA2hJ
        to: "0xef4943d727e34280a2efa0b3352dfd61f508ee48"
      properties:
        amount:
          format: int32
          type: integer
        contractaddress:
          type: string
        from:
          type: string
        identifier:
          type: string
        password:
          type: string
        to:
          type: string
      required:
        - contractaddress
        - from
        - to
        - password
        - amount
        - identifier
      title: sendTokenRequest
      type: object
    subscribeAddress:
      example:
        contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
        ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
        ok: true
        url: https://yoururl.com/ipnreceiver.php
      properties:
        contractaddress:
          type: string
        ethereumaddress:
          type: string
        ok:
          type: boolean
        url:
          type: string
      required:
        - ok
        - ethereumaddress
        - contractaddress
        - url
      title: subscribeAddress
      type: object
    subscribeAddressRequest:
      example:
        contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
        ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
        url: https://yoururl.com/ipnreceiver.php
      properties:
        contractaddress:
          type: string
        ethereumaddress:
          type: string
        url:
          type: string
      required:
        - ethereumaddress
        - contractaddress
        - url
      title: subscribeAddressRequest
      type: object
    unsubscribeAddress:
      example:
        contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
        deleted: true
        ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
        ok: true
        url: https://yoururl.com/ipnreceiver.php
      properties:
        contractaddress:
          type: string
        deleted:
          type: boolean
        ethereumaddress:
          type: string
        ok:
          type: boolean
        url:
          type: string
      required:
        - ok
        - ethereumaddress
        - contractaddress
        - url
        - deleted
      title: unsubscribeAddress
      type: object
    unsubscribeAddressRequest:
      example:
        contractaddress: "0x514910771af9ca656af840dff83e8264ecf986ca"
        ethereumaddress: "0xa2107fa5b38d9bbd2c461d6edf11b11a50f6b974"
        url: https://yoururl.com/ipnreceiver.php
      properties:
        contractaddress:
          type: string
        ethereumaddress:
          type: string
        url:
          type: string
      required:
        - ethereumaddress
        - contractaddress
        - url
      title: unsubscribeAddressRequest
      type: object
