QAN TestNet Docs
QANplatform/Testnet/QAN API Methods/Overview

QAN API Methods

Use APIs to interact with the QAN TestNet.

qan_accounts

Returns a list of addresses owned by client.

HTTP response status codes for "qan_accounts"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_accounts"

Request examples

get/accounts/
cURLJavaScriptGo
curl --request GET \
  --url /accounts/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/accounts/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/accounts/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Accounts":"array"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_blobBaseFee

Returns the expected base fee for blobs in the next block.

HTTP response status codes for "qan_blobBaseFee"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_blobBaseFee"

Request examples

get/blobBaseFee/
cURLJavaScriptGo
curl --request GET \
  --url /blobBaseFee/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/blobBaseFee/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/blobBaseFee/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"BaseFee":"12345"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_blockNumber

Returns the latest block number of the blockchain.

HTTP response status codes for "qan_blockNumber"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_blockNumber"

Request examples

get/blockNumber/
cURLJavaScriptGo
curl --request GET \
  --url /blockNumber/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/blockNumber/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/blockNumber/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"BlockNumber":"latest"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_call

Executes a new message call immediately without creating a transaction on the block chain.

HTTP response status codes for "qan_call"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_call"

Request examples

post/call/
cURLJavaScriptGo
curl --request POST \
  --url /call/ \
  --header 'Accept: application/json, , application/problem+json' \
  --header 'Content-Type: application/json' \
  --data '
{
"BlockNumber": "string",
"Transaction": {
  "Data": "string",
  "From": "string",
  "Gas": "string",
  "GasPrice": "string",
  "To": "string",
  "Value": "string"
}
}
'
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, , application/problem+json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    BlockNumber: 'string',
    Transaction: {
        Data: 'string',
        From: 'string',
        Gas: 'string',
        GasPrice: 'string',
        To: 'string',
        Value: 'string'
    }
  })
};

fetch('/call/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "/call/"

  payload := strings.NewReader("{\"BlockNumber\":\"string\",\"Transaction\":{\"Data\":\"string\",\"From\":\"string\",\"Gas\":\"string\",\"GasPrice\":\"string\",\"To\":\"string\",\"Value\":\"string\"}}")

  req, _ := http.NewRequest("POST", url, payload)

  req.Header.Add("Accept", "application/json, , application/problem+json")
  req.Header.Add("Content-Type", "application/json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Data":"0xcafebabe"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_chainId

Returns the current network/chain ID, used to sign replay-protected transaction introduced in EIP-155.

HTTP response status codes for "qan_chainId"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_chainId"

Request examples

get/chainId/
cURLJavaScriptGo
curl --request GET \
  --url /chainId/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/chainId/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/chainId/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"ChainId":"1"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_estimateGas

Returns an estimation of gas for a given transaction.

HTTP response status codes for "qan_estimateGas"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_estimateGas"

Request examples

post/estimateGas/
cURLJavaScriptGo
curl --request POST \
  --url /estimateGas/ \
  --header 'Accept: application/json, , application/problem+json' \
  --header 'Content-Type: application/json' \
  --data '
{
"Object": {
  "Balance": "string",
  "Code": "integer",
  "Nonce": "string",
  "State": "string",
  "StateDiff": "string"
},
"Transaction": {
  "Data": "string",
  "From": "string",
  "Gas": "string",
  "GasPrice": "string",
  "To": "string",
  "Value": "string"
}
}
'
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, , application/problem+json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    Object: {
        Balance: 'string',
        Code: 'integer',
        Nonce: 'string',
        State: 'string',
        StateDiff: 'string'
    },
    Transaction: {
        Data: 'string',
        From: 'string',
        Gas: 'string',
        GasPrice: 'string',
        To: 'string',
        Value: 'string'
    }
  })
};

fetch('/estimateGas/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "/estimateGas/"

  payload := strings.NewReader("{\"Object\":{\"Balance\":\"string\",\"Code\":\"integer\",\"Nonce\":\"string\",\"State\":\"string\",\"StateDiff\":\"string\"},\"Transaction\":{\"Data\":\"string\",\"From\":\"string\",\"Gas\":\"string\",\"GasPrice\":\"string\",\"To\":\"string\",\"Value\":\"string\"}}")

  req, _ := http.NewRequest("POST", url, payload)

  req.Header.Add("Accept", "application/json, , application/problem+json")
  req.Header.Add("Content-Type", "application/json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"EstimatedGas":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_feeHistory

Returns the collection of historical gas information.

HTTP response status codes for "qan_feeHistory"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_feeHistory"

Request examples

post/feeHistory/
cURLJavaScriptGo
curl --request POST \
  --url /feeHistory/ \
  --header 'Accept: application/json, , application/problem+json' \
  --header 'Content-Type: application/json' \
  --data '
{
"BlockCount": "integer",
"NewestBlock": "string",
"RewardPercentiles": "array"
}
'
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, , application/problem+json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({BlockCount: 'integer', NewestBlock: 'string', RewardPercentiles: 'array'})
};

fetch('/feeHistory/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "/feeHistory/"

  payload := strings.NewReader("{\"BlockCount\":\"integer\",\"NewestBlock\":\"string\",\"RewardPercentiles\":\"array\"}")

  req, _ := http.NewRequest("POST", url, payload)

  req.Header.Add("Accept", "application/json, , application/problem+json")
  req.Header.Add("Content-Type", "application/json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"BaseFeePerGas":"array","GasUsedRatio":"array","OldestBlock":"string","Reward":"array"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_gasPrice

Returns the current gas price on the network in wei.

HTTP response status codes for "qan_gasPrice"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_gasPrice"

Request examples

get/gasPrice/
cURLJavaScriptGo
curl --request GET \
  --url /gasPrice/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/gasPrice/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/gasPrice/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"GasPrice":"12345"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getAccount

Retrieves account details by specifying an address and a block number/tag.

Parameters for "qan_getAccount"

Path parameters
AddressstringRequired

The account address for which the information is to be retrieved

BlockReferencestringRequired

The block number in hexadecimal or decimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

HTTP response status codes for "qan_getAccount"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getAccount"

Request examples

get/getAccount/{Address}/{BlockReference}/
cURLJavaScriptGo
curl --request GET \
  --url /getAccount/%7BAddress%7D/%7BBlockReference%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getAccount/%7BAddress%7D/%7BBlockReference%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getAccount/%7BAddress%7D/%7BBlockReference%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Balance":"string","CodeHash":"string","Nonce":"string","StorageRoot":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getBalance

Returns the balance of the account of given address.

Parameters for "qan_getBalance"

Path parameters
AddressstringRequired

A 20 bytes long hexadecimal value representing an Ethereum address

Query parameters
BlockNumberstring

The block number in hexadecimal or decimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

HTTP response status codes for "qan_getBalance"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getBalance"

Request examples

get/getBalance/{Address}/
cURLJavaScriptGo
curl --request GET \
  --url /getBalance/%7BAddress%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getBalance/%7BAddress%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getBalance/%7BAddress%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Balance":"0xcafebabe"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getBlockByHash

Returns information of the block matching the given block hash.

Parameters for "qan_getBlockByHash"

Path parameters
HashstringRequired

The hash (32 bytes) of the block

TransactionDetailFlagbooleanRequired

The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions

HTTP response status codes for "qan_getBlockByHash"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getBlockByHash"

Request examples

get/getBlockByHash/{Hash}/{TransactionDetailFlag}/
cURLJavaScriptGo
curl --request GET \
  --url /getBlockByHash/%7BHash%7D/%7BTransactionDetailFlag%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getBlockByHash/%7BHash%7D/%7BTransactionDetailFlag%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getBlockByHash/%7BHash%7D/%7BTransactionDetailFlag%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Block":""}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getBlockByNumber

Returns information of the block matching the given block number.

Parameters for "qan_getBlockByNumber"

Path parameters
BlockNumberstringRequired

The block number in hexadecimal or decimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

TransactionDetailFlagbooleanRequired

The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions

HTTP response status codes for "qan_getBlockByNumber"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getBlockByNumber"

Request examples

get/getBlockByNumber/{BlockNumber}/{TransactionDetailFlag}/
cURLJavaScriptGo
curl --request GET \
  --url /getBlockByNumber/%7BBlockNumber%7D/%7BTransactionDetailFlag%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getBlockByNumber/%7BBlockNumber%7D/%7BTransactionDetailFlag%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getBlockByNumber/%7BBlockNumber%7D/%7BTransactionDetailFlag%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Block":""}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getBlockReceipts

Returns all transaction receipts for a given block.

Parameters for "qan_getBlockReceipts"

Path parameters
BlockNumberstringRequired

The block number in hexadecimal or decimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

HTTP response status codes for "qan_getBlockReceipts"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getBlockReceipts"

Request examples

get/getBlockReceipts/{BlockNumber}/
cURLJavaScriptGo
curl --request GET \
  --url /getBlockReceipts/%7BBlockNumber%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getBlockReceipts/%7BBlockNumber%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getBlockReceipts/%7BBlockNumber%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"TransactionReceipts":"array"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getBlockTransactionCountByHash

Returns the number of transactions for the block matching the given block hash.

Parameters for "qan_getBlockTransactionCountByHash"

Path parameters
HashstringRequired

The hash of the block

HTTP response status codes for "qan_getBlockTransactionCountByHash"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getBlockTransactionCountByHash"

Request examples

get/getBlockTransactionCountByHash/{Hash}/
cURLJavaScriptGo
curl --request GET \
  --url /getBlockTransactionCountByHash/%7BHash%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getBlockTransactionCountByHash/%7BHash%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getBlockTransactionCountByHash/%7BHash%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"TransactionCount":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getBlockTransactionCountByNumber

Returns the number of transactions for the block matching the given block number.

Parameters for "qan_getBlockTransactionCountByNumber"

Path parameters
BlockNumberstringRequired

The block number in hexadecimal or decimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

HTTP response status codes for "qan_getBlockTransactionCountByNumber"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getBlockTransactionCountByNumber"

Request examples

get/getBlockTransactionCountByNumber/{BlockNumber}/
cURLJavaScriptGo
curl --request GET \
  --url /getBlockTransactionCountByNumber/%7BBlockNumber%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getBlockTransactionCountByNumber/%7BBlockNumber%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getBlockTransactionCountByNumber/%7BBlockNumber%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"TransactionCount":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getCode

Returns the compiled bytecode of a smart contract.

Parameters for "qan_getCode"

Path parameters
AddressstringRequired

The address of the smart contract from which the bytecode will be obtained

Query parameters
BlockNumberstring

The block number in hexadecimal or decimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

HTTP response status codes for "qan_getCode"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getCode"

Request examples

get/getCode/{Address}/
cURLJavaScriptGo
curl --request GET \
  --url /getCode/%7BAddress%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getCode/%7BAddress%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getCode/%7BAddress%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Bytecode":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getFilterChanges

Polling method for a filter, which returns an array of events that have occurred since the last poll.

Parameters for "qan_getFilterChanges"

Path parameters
FilterIdstringRequired

The filter id that is returned from eth_newFilter, eth_newBlockFilter or eth_newPendingTransactionFilter

HTTP response status codes for "qan_getFilterChanges"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getFilterChanges"

Request examples

get/getFilterChanges/{FilterId}/
cURLJavaScriptGo
curl --request GET \
  --url /getFilterChanges/%7BFilterId%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getFilterChanges/%7BFilterId%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getFilterChanges/%7BFilterId%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Result":""}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getFilterLogs

Returns an array of all logs matching filter with given id.

Parameters for "qan_getFilterLogs"

Path parameters
IdstringRequired

The filter ID

HTTP response status codes for "qan_getFilterLogs"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getFilterLogs"

Request examples

get/getFilterLogs/{Id}/
cURLJavaScriptGo
curl --request GET \
  --url /getFilterLogs/%7BId%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getFilterLogs/%7BId%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getFilterLogs/%7BId%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Logs":"array"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getLogs

Returns an array of all logs matching a given filter object.

HTTP response status codes for "qan_getLogs"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getLogs"

Request examples

post/getLogs/
cURLJavaScriptGo
curl --request POST \
  --url /getLogs/ \
  --header 'Accept: application/json, , application/problem+json' \
  --header 'Content-Type: application/json' \
  --data '
{
"Address": "string",
"BlockHash": "string",
"FromBlock": "string",
"ToBlock": "string",
"Topics": "array"
}
'
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, , application/problem+json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    Address: 'string',
    BlockHash: 'string',
    FromBlock: 'string',
    ToBlock: 'string',
    Topics: 'array'
  })
};

fetch('/getLogs/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "/getLogs/"

  payload := strings.NewReader("{\"Address\":\"string\",\"BlockHash\":\"string\",\"FromBlock\":\"string\",\"ToBlock\":\"string\",\"Topics\":\"array\"}")

  req, _ := http.NewRequest("POST", url, payload)

  req.Header.Add("Accept", "application/json, , application/problem+json")
  req.Header.Add("Content-Type", "application/json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Logs":"array"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getProof

Returns the account and storage values of the specified account including the Merkle-proof.

HTTP response status codes for "qan_getProof"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getProof"

Request examples

post/getProof/
cURLJavaScriptGo
curl --request POST \
  --url /getProof/ \
  --header 'Accept: application/json, , application/problem+json' \
  --header 'Content-Type: application/json' \
  --data '
{
"Address": "string",
"BlockNumber": "string",
"StorageKeys": "array"
}
'
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, , application/problem+json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({Address: 'string', BlockNumber: 'string', StorageKeys: 'array'})
};

fetch('/getProof/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "/getProof/"

  payload := strings.NewReader("{\"Address\":\"string\",\"BlockNumber\":\"string\",\"StorageKeys\":\"array\"}")

  req, _ := http.NewRequest("POST", url, payload)

  req.Header.Add("Accept", "application/json, , application/problem+json")
  req.Header.Add("Content-Type", "application/json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"AccountProof":"string","Address":"string","Balance":"string","CodeHash":"string","Nonce":["string","null"],"StorageHash":"string","StorageProof":"array"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getStorageAt

Returns the value from a storage position at a given address.

HTTP response status codes for "qan_getStorageAt"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getStorageAt"

Request examples

post/getStorageAt/
cURLJavaScriptGo
curl --request POST \
  --url /getStorageAt/ \
  --header 'Accept: application/json, , application/problem+json' \
  --header 'Content-Type: application/json' \
  --data '
{
"Address": "string",
"BlockNumber": "string",
"Position": "string"
}
'
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, , application/problem+json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({Address: 'string', BlockNumber: 'string', Position: 'string'})
};

fetch('/getStorageAt/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "/getStorageAt/"

  payload := strings.NewReader("{\"Address\":\"string\",\"BlockNumber\":\"string\",\"Position\":\"string\"}")

  req, _ := http.NewRequest("POST", url, payload)

  req.Header.Add("Accept", "application/json, , application/problem+json")
  req.Header.Add("Content-Type", "application/json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Value":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getTransactionByBlockHashAndIndex

Returns information about a transaction given a blockhash and transaction index position.

Parameters for "qan_getTransactionByBlockHashAndIndex"

Path parameters
blockHashstringRequired
indexstringRequired

An integer of the transaction index position

HTTP response status codes for "qan_getTransactionByBlockHashAndIndex"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getTransactionByBlockHashAndIndex"

Request examples

get/getTransactionByBlockHashAndIndex/{blockHash}/{index}/
cURLJavaScriptGo
curl --request GET \
  --url /getTransactionByBlockHashAndIndex/%7BblockHash%7D/%7Bindex%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getTransactionByBlockHashAndIndex/%7BblockHash%7D/%7Bindex%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getTransactionByBlockHashAndIndex/%7BblockHash%7D/%7Bindex%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Transaction":""}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getTransactionByBlockNumberAndIndex

Returns information about a transaction given a block number and transaction index position.

Parameters for "qan_getTransactionByBlockNumberAndIndex"

Path parameters
blockNumberstringRequired

The block number in hexadecimal or decimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

indexstringRequired

An integer of the transaction index position

HTTP response status codes for "qan_getTransactionByBlockNumberAndIndex"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getTransactionByBlockNumberAndIndex"

Request examples

get/getTransactionByBlockNumberAndIndex/{blockNumber}/{index}/
cURLJavaScriptGo
curl --request GET \
  --url /getTransactionByBlockNumberAndIndex/%7BblockNumber%7D/%7Bindex%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getTransactionByBlockNumberAndIndex/%7BblockNumber%7D/%7Bindex%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getTransactionByBlockNumberAndIndex/%7BblockNumber%7D/%7Bindex%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Transaction":""}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getTransactionByHash

Returns the information about a transaction from a transaction hash.

Parameters for "qan_getTransactionByHash"

Path parameters
hashstringRequired

The hash of a transaction

HTTP response status codes for "qan_getTransactionByHash"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getTransactionByHash"

Request examples

get/getTransactionByHash/{hash}/
cURLJavaScriptGo
curl --request GET \
  --url /getTransactionByHash/%7Bhash%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getTransactionByHash/%7Bhash%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getTransactionByHash/%7Bhash%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Transaction":""}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getTransactionCount

Returns the number of transactions sent from an address.

Parameters for "qan_getTransactionCount"

Path parameters
AddressstringRequired

The address from which the transaction count to be checked

BlockNumberstringRequired

The block number in hexadecimal or decimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

HTTP response status codes for "qan_getTransactionCount"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getTransactionCount"

Request examples

get/getTransactionCount/{Address}/{BlockNumber}/
cURLJavaScriptGo
curl --request GET \
  --url /getTransactionCount/%7BAddress%7D/%7BBlockNumber%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getTransactionCount/%7BAddress%7D/%7BBlockNumber%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getTransactionCount/%7BAddress%7D/%7BBlockNumber%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"TransactionCount":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

Parameters for "qan_getTransactionReceipt"

Path parameters
HashstringRequired

The hash of a transaction

HTTP response status codes for "qan_getTransactionReceipt"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getTransactionReceipt"

Request examples

get/getTransactionReceipt/{Hash}/
cURLJavaScriptGo
curl --request GET \
  --url /getTransactionReceipt/%7BHash%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getTransactionReceipt/%7BHash%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getTransactionReceipt/%7BHash%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"TransactionReceipt":""}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getUncleCountByBlockHash

Returns the number of uncles for the block matching the given block hash.

Parameters for "qan_getUncleCountByBlockHash"

Path parameters
HashstringRequired

The hash of the block to get uncles for

HTTP response status codes for "qan_getUncleCountByBlockHash"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getUncleCountByBlockHash"

Request examples

get/getUncleCountByBlockHash/{Hash}/
cURLJavaScriptGo
curl --request GET \
  --url /getUncleCountByBlockHash/%7BHash%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getUncleCountByBlockHash/%7BHash%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getUncleCountByBlockHash/%7BHash%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"UncleCount":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_getUncleCountByBlockNumber

Returns the number of uncles for the block matching the given block number.

Parameters for "qan_getUncleCountByBlockNumber"

Path parameters
BlockNumberstringRequired

The block number in hexadecimal or decimal format or the string latest, earliest, pending, safe or finalized (safe and finalized tags are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova and Avalanche C-chain), see the default block parameter description in the official Ethereum documentation

HTTP response status codes for "qan_getUncleCountByBlockNumber"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_getUncleCountByBlockNumber"

Request examples

get/getUncleCountByBlockNumber/{BlockNumber}/
cURLJavaScriptGo
curl --request GET \
  --url /getUncleCountByBlockNumber/%7BBlockNumber%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/getUncleCountByBlockNumber/%7BBlockNumber%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/getUncleCountByBlockNumber/%7BBlockNumber%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"UncleCount":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_maxPriorityFeePerGas

Get the priority fee needed to be included in a block.

HTTP response status codes for "qan_maxPriorityFeePerGas"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_maxPriorityFeePerGas"

Request examples

get/maxPriorityFeePerGas/
cURLJavaScriptGo
curl --request GET \
  --url /maxPriorityFeePerGas/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/maxPriorityFeePerGas/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/maxPriorityFeePerGas/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"MaxPriorityFeePerGas":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_newBlockFilter

Creates a filter in the node, to notify when a new block arrives.

HTTP response status codes for "qan_newBlockFilter"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_newBlockFilter"

Request examples

get/newBlockFilter/
cURLJavaScriptGo
curl --request GET \
  --url /newBlockFilter/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/newBlockFilter/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/newBlockFilter/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"FilterId":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_newFilter

Creates a filter object, based on filter options, to notify when the state changes (logs).

HTTP response status codes for "qan_newFilter"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_newFilter"

Request examples

post/newFilter/
cURLJavaScriptGo
curl --request POST \
  --url /newFilter/ \
  --header 'Accept: application/json, , application/problem+json' \
  --header 'Content-Type: application/json' \
  --data '
{
"FilterObject": {
  "Address": "string",
  "FromBlock": "string",
  "ToBlock": "string",
  "Topics": "array"
}
}
'
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, , application/problem+json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    FilterObject: {Address: 'string', FromBlock: 'string', ToBlock: 'string', Topics: 'array'}
  })
};

fetch('/newFilter/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "/newFilter/"

  payload := strings.NewReader("{\"FilterObject\":{\"Address\":\"string\",\"FromBlock\":\"string\",\"ToBlock\":\"string\",\"Topics\":\"array\"}}")

  req, _ := http.NewRequest("POST", url, payload)

  req.Header.Add("Accept", "application/json, , application/problem+json")
  req.Header.Add("Content-Type", "application/json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"FilterId":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_newPendingTransactionFilter

Creates a filter in the node to notify when new pending transactions arrive.

HTTP response status codes for "qan_newPendingTransactionFilter"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_newPendingTransactionFilter"

Request examples

get/newPendingTransactionFilter/
cURLJavaScriptGo
curl --request GET \
  --url /newPendingTransactionFilter/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/newPendingTransactionFilter/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/newPendingTransactionFilter/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"FilterId":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_sendRawTransaction

Creates new message call transaction or a contract creation for signed transactions.

HTTP response status codes for "qan_sendRawTransaction"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_sendRawTransaction"

Request examples

post/sendRawTransaction/
cURLJavaScriptGo
curl --request POST \
  --url /sendRawTransaction/ \
  --header 'Accept: application/json, , application/problem+json' \
  --header 'Content-Type: application/json' \
  --data '{"Data":"string"}'
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, , application/problem+json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({Data: 'string'})
};

fetch('/sendRawTransaction/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "/sendRawTransaction/"

  payload := strings.NewReader("{\"Data\":\"string\"}")

  req, _ := http.NewRequest("POST", url, payload)

  req.Header.Add("Accept", "application/json, , application/problem+json")
  req.Header.Add("Content-Type", "application/json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"TransactionHash":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_subscribe

Starts a subscription to a specific event.

HTTP response status codes for "qan_subscribe"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_subscribe"

Request examples

post/subscribe/
cURLJavaScriptGo
curl --request POST \
  --url /subscribe/ \
  --header 'Accept: application/json, , application/problem+json' \
  --header 'Content-Type: application/json' \
  --data '
{
"Data": "null",
"Flag": "boolean",
"SubscriptionName": "string"
}
'
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/json, , application/problem+json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({Data: 'null', Flag: 'boolean', SubscriptionName: 'string'})
};

fetch('/subscribe/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "/subscribe/"

  payload := strings.NewReader("{\"Data\":\"null\",\"Flag\":\"boolean\",\"SubscriptionName\":\"string\"}")

  req, _ := http.NewRequest("POST", url, payload)

  req.Header.Add("Accept", "application/json, , application/problem+json")
  req.Header.Add("Content-Type", "application/json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"SubscriptionId":"string"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_syncing

Returns an object with the sync status of the node if the node is out-of-sync and is syncing. Returns null when the node is already in sync.

HTTP response status codes for "qan_syncing"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_syncing"

Request examples

get/syncing/
cURLJavaScriptGo
curl --request GET \
  --url /syncing/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/syncing/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/syncing/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"SyncStatus":""}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_uninstallFilter

Uninstalls a filter with the given filter id.

Parameters for "qan_uninstallFilter"

Path parameters
FilterIdstringRequired

The filter ID that needs to be uninstalled. It should always be called when watch is no longer needed. Additionally, Filters timeout when they aren't requested with eth_getFilterChanges for a period of time

HTTP response status codes for "qan_uninstallFilter"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_uninstallFilter"

Request examples

get/uninstallFilter/{FilterId}/
cURLJavaScriptGo
curl --request GET \
  --url /uninstallFilter/%7BFilterId%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/uninstallFilter/%7BFilterId%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/uninstallFilter/%7BFilterId%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Result":"boolean"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_unsubscribe

Cancels an existing subscription so that no further events are sent.

Parameters for "qan_unsubscribe"

Path parameters
SubscriptionIdstringRequired

A subscription ID that was previously generated in a eth_subscribe RPC request

HTTP response status codes for "qan_unsubscribe"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_unsubscribe"

Request examples

get/unsubscribe/{SubscriptionId}/
cURLJavaScriptGo
curl --request GET \
  --url /unsubscribe/%7BSubscriptionId%7D/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/unsubscribe/%7BSubscriptionId%7D/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/unsubscribe/%7BSubscriptionId%7D/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{"Result":"boolean"}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

qan_xlinkValid

HTTP response status codes for "qan_xlinkValid"

Status Code Description
200 OK
400 Bad Request
404 Not Found
422 Unprocessable Entity
500 Internal Server Error

Code samples for "qan_xlinkValid"

Request examples

get/xlinkValid/
cURLJavaScriptGo
curl --request GET \
  --url /xlinkValid/ \
  --header 'Accept: application/json, , application/problem+json'
const options = {
  method: 'GET',
  headers: {Accept: 'application/json, , application/problem+json'}
};

fetch('/xlinkValid/', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {

  url := "/xlinkValid/"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("Accept", "application/json, , application/problem+json")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)

  fmt.Println(string(body))

}

Response examples

200400404422500
Content type: application/json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}
Content type: application/problem+json
{}

Previous

Interacting with a smart contract

Next

qan_accounts