Global Blockchain Acquiring

Cryptonex (CNX)

To get CNX, you need
to create an account and
deposit BTC, ETH or fiat money.


API

API allows making exchange transactions and obtaining account information.

To use API, you need to create an API key. The API key can be created in the backoffice in the settings in the "setup API" section. After creating the API key you will also receive a secret key. The information about the API keys is used for authentication.

All the requests are sent to the following URL address: https://userapi.cryptonex.org/api.

The method name and all the method parameters are sent via POST-method in JSON-RPC parameters.

Each request requires authentication.

Authentication is carried out by sending the following JSON-RPC 2.0 parameters:

Key Key — the public key; you can find it in the user profile settings (for example: 258ae265-642323ae6-8e22-c6a11fe26f3fsdsdw4b)
Sign Sign — POST data "user.account_list" + "1" + "aQcLC343dsfg9hgbOLGeredfsdfIry"(API method + nonce + Secret key) - signed by a secret key with SHA-256 method, the secret key can also be found in the user profile settings.
Nonce Nonce - Numeric parameter nonce increasing with each following request.

Example Curl

curl -H "Content-Type: application/json" -X POST -d '{"jsonrpc":"2.0", "method": "user.account_list", "params":{"key":"941-fb77-4153-a057-0fgh83c3a454c", "sign": "4e96bc40b2gfhvbn65771ac493cbbed4b4aa2c5ec6006c32ae8385e48e3c", "nonce": 1}, "id":2}' https://userapi.cryptonex.org/api
              

API Methods

List of wallets

Name of the method: user.account_list
Input parameters: No
Example of use:
{
  "jsonrpc":"2.0",
  "method": "user.account_list",
  "params":{
    "key":"330f1dd6-af88-4335-bb8f-0a7b9f6afaa7", // public key
    "sign": "Code", // generated inscription
    "nonce": 1 // obligatory incremental value
  },
  "id":2
}
									    
Return value:
{
  "id":2,"jsonrpc":"2.0",
  "result":{
  "accounts":[
    {
      "balance":"0", // current balance
      "currency":"btc", // currency
      "hash":"14x2insrz24PirkRA73TFwvNRYTKqbwxEQ", //hash wallet address
      "type":"crypto" // type of currency
    },{
      "balance":"0",
      "currency":"eth",
      "hash":"0x79ff9548653c3a1777c4121f65c678e72629ef9e",
      "type":"crypto"
    }]
  }
}

                      

Withdrawal of funds

Name of the method: account.withdraw
Input parameters:

from_hash - hash of the account making a transfer(created on the site).

to_hash - hash of the account the transfer will be made to(created on the site)or crypto wallet.

amount - the amount of the currency to withdraw.

auth_2fa_code - the code of the two-factor authentication(if it is switched on).

Example of use:
{
  "jsonrpc":"2.0",
  "method": "account.withdraw",
  "params":{
    "key":"330f1dd6-af88-4335-bb8f-0a7b9f6afaa7", // public key
    "sign": "Code", // generated inscription
    "nonce": 1 // obligatory incremental value,
    "amount":"5",
    "from_hash":"Gh7tmu4234fsdfnweLLdisb8xMaxGyWCv7ui",
    "to_hash":"GgDEpsfEWrsdfse343MkdmcKv5C4axYR87",
  },
  "id":2
}
                    
Return value:
{
"id":1,
  "jsonrpc":"2.0",
  "result":{
    "balance":"76.53154234", // current balance
    "confirm_type":"email", // type of confirmation 
    "currency":"cnx", // type of currency
    "hash":"Gh7tmu4234fsdfnweLLdisb8xMaxGyWCv7ui",
    "id":7,
    user_id":2
  }
}

                        

List of Transactions

Name of the method: transaction.list
Input parameters:

max_count - maximum number of the requested transactions

Example of use:
{
  "jsonrpc":"2.0",
  "method": "account.withdraw",
  "params":{
    "key":"330f1dd6-af88-4335-bb8f-0a7b9f6afaa7", // public key
    "sign": "Code", // generated inscription
    "nonce": 1 // obligatory incremental value,
    "max_count": 10,
  },
  "id":2
}
                      
Return value:
{
  "id":5,
  "jsonrpc":"2.0",
  "result":{
    "summary":{
      "first_stamp":"2017-08-31 22:46:31.15804",
      "last_stamp":"2018-01-30 12:15:23.026104",
      "total":180 // total number of transactions
    },
    "transactions":[
    {
      "block_hash":"",
      "from_amount":"5",
      "from_commission":"0",
      "from_currency":"cnx",
      "from_hash":"Gh7tmu43836W5nweLLdisb8xMaxGyWCvLr",
      "id":1918,
      "post_stamp":"2018-01-30 12:15:23.026104",
      "rate":"0",
      "status":"moderate",
      "to_amount":"5",
      "to_currency":"cnx",
      "to_hash":"GgDEpsfEWrN8xiQDezMkdmcKv5C4axYRGk",
      "tx_id":"",
      "type":"withdrawal",
      "update_stamp":"2018-01-30 12:15:23.026104"
    }]
  }
}
                      

List of rates

Name of the method: currency_pair.get_rate_list
Input parameters: No
Example of use:
{
  "jsonrpc":"2.0",
  "method": "currency_pair.get_rate_list",
  "params":{
    "key":"330f1dd6-af88-4335-bb8f-0a7b9f6afaa7", // public key
    "sign": "Code", // generated inscription
    "nonce": 1 // obligatory incremental value,
  },
  "id":2
}
                    
Return value:
{
  "id":2,
  "jsonrpc":"2.0",
  "result":{
    "rates":[
      {
        "alias":"CNX/BTC",
        "ask":"0.0007866",
        "base_currency":"cnx",
        "base_type":"crypto",
        "bid":"0.00072375",
        "convert_type":"cross",
        "rel_currency_id":"btc",
        "rel_type":"crypto",
        "update_stamp":"2018-01-30 12:50:02.794084",
        "value_last_24h":"18536.65481165"
      }
    ]
  }
}

                        

Currencies Exchange

Name of the method: currency.convert
Input parameters:

amount - the amount of the currency.

from_currency - the currency you want to exchange.

to_currency - the currency you will receive..

Example of use:
{
  "jsonrpc":"2.0",
  "method": "currency.convert",
  "params":{
    "key":"330f1dd6-af88-4335-bb8f-0a7b9f6afaa7", // public key
    "sign": "Code", // generated inscription
    "nonce": 1 // obligatory incremental value,
    "amount":"1",
    "from_currency":"cnx",
    "to_currency":"btc"
  },
  "id":2
}
                    
Return value:
{
  "id":2,
  "jsonrpc":"2.0",
  "result":{
    "status": "ok"
  }
}

                        

Information about a user

Name of the method: user.info
Input parameters: No
Example of use:
{
  "jsonrpc":"2.0",
  "method": "user.info",
  "params":{
    "key":"330f1dd6-af88-4335-bb8f-0a7b9f6afaa7", // public key
    "sign": "Code", // generated inscription
    "nonce": 1 // obligatory incremental value,
  },
  "id":2
}
                    
Return value:
{
  "id":2,
  "jsonrpc":"2.0",
  "result":{
    "auth_2fa":false,
    "deposit_auto_convert":false,
    "eth_cnx_bonus":"0.0",
    "id":2,
    "login":"[email protected]",
    "post_stamp":"2017-08-29 20:29:27.844215"
  }
}