NAV
bash javascript

Crypto Exchange API

godex API ver.1 allows you to get programming access to the services of Godex exchange platform. Some of the requests have such parameters as 'coin_from' or ‘coin_to’, which is coin ticker in uppercase. Examples: ‘BTC’, ‘ETH’, ‘XMR’, ‘IOTA’, ‘CLOAK’. This list is constantly growing as we’re adding new coins. All requests needs to be executed using HTTPS, this is a security measure.

Extra ID is an additional field for wallet addresses of currencies that may use additional ID for transaction processing (XRP, STEEM/SBD, XLM, DCT, XEM, XMR). This parameter should be filled only if the coin has this additional identifier. In any other case this parameter is not filled or not sent at all. All requests needs to be executed using HTTPS, this is a security measure. For every request to https://api.godex.io/api/v1/ following parameters should be used in headers:

Content-Type: application/json

Accept: application/json

API URL

Environment REST
PROD https://api.godex.io/api/v1/

Authorization

Some requests requires API authorization key. There are also requests where this authorization is not mandatory, but it should be included in order to access such features like assigning transactions to the user's personal account and getting information from the user's account. To set up API authorisation, following parameter should be added in headers:

public-key: {partners_token}

public-key can be obtained in the user's personal account or by sending a request to godex support [email protected].

The next parameter should be Included in the API query:

affiliate_id

Your affiliate id can be also obtained in the user's personal affiliate account.

Get a List of Coins

Example request:

curl -X GET "https://api.godex.io/api/v1/coins" \
-H "Accept: application/json"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/coins",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}


$.ajax(settings).done(function (response) {
    console.log(response);
});

$requestHeaders = ['Content-type: application/json'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.godex.io/api/v1/coins');
curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);

Example response:

[{
      "code": "BTC",
      "name": "Bitcoin",
      "disabled": 0,
      "icon": "https://godex.io/storage/coins/BTC.png",
      "has_extra": 0,
      "extra_name": null,
      "explorer": null,
   },
   {
      "code": "ETH",
      "name": "Ethereum",
      "disabled": 0,
      "icon": "https://godex.io/storage/coins/ETH.png",
      "has_extra": 0,
      "extra_name": null,
      "explorer": null,
   }]

HTTP Request

GET /api/v1/coins

This returns the list of coins, available for exchange with selected coin at given time, or gets entire list of coins. Response also contains such parameters as extra id name, if it exists, For example, destination tag for Ripple, message for XEM or payment id for Monero. In addition, it provides icon links.

Response:

Name Type Description
code string Coin short name (code)
name string Currency full name
disabled int The availability of the coins. 0 - available, 1 - unavailable
icon string The link to the coin logo
has_extra int 1 if coin may have an extra ID in addition to the address, 0 if it doesn’t
extra_name string|null Name of the extra ID
explorer string|null Currency blockchain explorer URL. It is used for checking transaction status in block explorer

Coin Info

Example request:


curl -X POST "https://api.godex.io/api/v1/info" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{ "from": "BTC", "to": "ETH", "amount": 1 }'
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/info",
    "method": "POST",
    "data": {
        "from": "BTC",
        "to": "ETH",
        "amount": 1
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

        $requestHeaders = [
            'Content-type: application/json'
        ];
        $ch = curl_init('https://api.godex.io/api/v1/info');
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
                "from" : "BTC",
                "to":"ETH",
                "amount": 1])
                );
        curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);

The above command returns JSON structured like this:

{
"min_amount": 0.01,
"max_amount": 0,
"amount": 28.94050772,
"fee": 0,
"rate": 28.94050772
"networks_from": [{"network":"ZEC","has_tag":0}, {"network":"BNB","has_tag":1}, {"network":"BSC","has_tag":0}]
"networks_to": [{"network":"BTC","has_tag":0}]
}

HTTP Request

POST api/v1/info

Gets current rate, calculates final amount that user will get, and also it sets minimum and maximum amounts for deposit.

Parameters

Parameter Type Status Description
from string required Coin code from
to string required Coin code to
amount numeric required Amount of currency “from”

Response

name Type Description
min_amount float Minimum possible amount to be sent
max_amount float Maximum possible amount to be sent; usually we do not have upper limits
amount float The final amount that user will receive after the exchange
fee float Service fee (in destination currency)
rate float Current exchange rate offered by godex
networks_from array Array of networks objects for coin from
network string Name of network
has_tag int 1 if coin may have an extra ID in addition to the address, 0 if it doesn’t
networks_to array Array of networks objects for coin to

Coin Info Revert

Example request:


curl -X POST "https://api.godex.io/api/v1/info-revert" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{ "from": "BTC", "to": "XMR", "amount": 75 }'
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/info-revert",
    "method": "POST",
    "data": {
        "from": "BTC",
        "to": "XMR",
        "amount": 75
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

        $requestHeaders = [
            'Content-type: application/json'
        ];
        $ch = curl_init('https://api.godex.io/api/v1/info-revert');
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
                "from" : "BTC",
                "to":"XMR",
                "amount": 75])
                );
        curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);

The above command returns JSON structured like this:

{
"min_amount": 0.76271832,
"max_amount": 0,
"amount": 1.0569014,
"fee": 0,
"rate": 74.57565357
}

HTTP Request

POST api/v1/info-revert

This method is used when you want to get the exact amount of specific coins. For example, when a customer needs to pay the bill with 5 XMR (coin ‘to’), and he needs to know how much BTC (coin ‘from’) he should send. The request gets current rate, calculates the amount of coins that user should send to receive the desired amount of ‘target’ currency, and also it sets the minimum and the maximum amounts for the deposit.

Parameters

Parameter Type Status Description
from string required Coin code from
to string required Coin code to
amount numeric required Amount of currency “to”

Response

name Type Description
min_amount float Minimum possible amount to be sent
max_amount float Maximum possible amount to be sent; usually we do not have upper limits
amount float The final amount that the user need send for exchange
fee float Service fee (in destination currency)
rate float Current exchange rate offered by godex

Transaction statuses

Transaction statuses

wait The exchange has just been created and it’s waiting for coins to reach the deposit wallet
confirmation The transaction appears in mempool and now it is waiting for necessary network confirmations to start.
confirmed User’s payment is confirmed, the exchange process is about to start.
exchanging The exchange process is running.
sending Currency is being sent to the recipient address.
sending_confirmation Outgoing transaction is waiting for network confirmations.
success The exchange is completed and currency is successfully sent to the recipient address.
overdue Deposit receiving time for this transaction has expired.
error Transaction has failed. In most cases, the amount was sent differs from specified one when creating the transaction.
refunded Exchange was failed and coins were refunded to user's wallet.

Create Transaction

Example request:


curl -X POST "https://api.godex.io/api/v1/transaction" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{ "coin_from": "LTC", "coin_to": "ETH", "deposit_amount": "1", "withdrawal": "0x5aadfa328D778383d1134F7530f9feaC676E74B80efCa", "withdrawal_extra_id": "qbGDbH9gwrAkJTM6gxsfQpWYMfe8zRuZsSpoU77sx73peCPbzdZaUWW9tKWbBDs3hmeV", "return": "LsZK2wfxvXrfsfB6L39qmCcV5DK29ismmAwN41", "return_extra_id": "qbGDbH9gwrAkfJTM6gxsfQpWYMfe8zRuZsSpoU77sx73peCPbzdZaUWW9tKWbBDs3hmeV", "affiliate_id": "yWSiyDh93J7NPDNY", "coin_to_network": null, "coin_from_network": "ZEC" }'
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/transaction",
    "method": "POST",
    "data": {
        "coin_from": "LTC",
        "coin_to": "ETH",
        "deposit_amount": 1,
        "withdrawal": "0x5aadfa328D778383d1134F7530f9feaC676E74B80efCa",
        "withdrawal_extra_id": "qbGDbH9gwrAkJTM6gxsfQpWYMfe8zRuZsSpoU77sx73peCPbzdZaUWW9tKWbBDs3hmeV",
        "return": "LsZK2wfxvXrfsfB6L39qmCcV5DK29ismmAwN41",
        "return_extra_id": "qbGDbH9gwrAkfJTM6gxsfQpWYMfe8zRuZsSpoU77sx73peCPbzdZaUWW9tKWbBDs3hmeV",
        "coin_to_network": null,
        "coin_from_network": "ZEC"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

        $requestHeaders = [
            'Content-type: application/json'
        ];
        $ch = curl_init('https://api.godex.io/api/v1/transaction');
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
                "coin_from" : "LTC",
                "coin_to":"ETH",
                "deposit_amount": 1,
                "withdrawal": 0x5aadfa328D778383d1134F7530f9feaC676E74B80efCa,
                "withdrawal_extra_id": qbGDbH9gwrAkJTM6gxsfQpWYMfe8zRuZsSpoU77sx73peCPbzdZaUWW9tKWbBDs3hmeV,
                "return": LsZK2wfxvXrfsfB6L39qmCcV5DK29ismmAwN41,
                "return_extra_id": qbGDbH9gwrAkfJTM6gxsfQpWYMfe8zRuZsSpoU77sx73peCPbzdZaUWW9tKWbBDs3hmeV,
                "affiliate_id": yWSiyDh93J7NPDNY,
                "coin_to_network": null,
                "coin_from_network": "ZEC"])
                );
        curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);

The above command returns JSON structured like this:

{
      "status": wait,
      "coin_from": "LTC",
      "coin_to": "ETH",
      "deposit_amount": 1,
      "withdrawal": "0x5aadfa328D778383d1134F7530f9feaC676E74B80efCa",
      "withdrawal_extra_id": "qbGDbH9gwrAkJTM6gxsfQpWYMfe8zRuZsSpoU77sx73peCPbzdZaUWW9tKWbBDs3hmeV",
      "return": "LsZK2wfxvXrfsfB6L39qmCcV5DK29ismmAwN41",
      "return_extra_id": "qbGDbH9gwrAkfJTM6gxsfQpWYMfe8zRuZsSpoU77sx73peCPbzdZaUWW9tKWbBDs3hmeV",
      "withdrawal_amount": 0.25281436,
      "deposit": "LsZK2wfxvXrdffsfB6L39qmCcV5DK29ismmAwN41",
      "deposit_extra_id": null,
      "rate": 0.26011493,
      "fee": 0.00730057,
      "transaction_id": "5bb4d99cd44a5",
   }

HTTP Request

POST api/v1/transaction

This call allows to request creating an exchange transaction. You choose coin pair you’d like to exchange, provide sender’s withdrawal address and specify amount of coins you want to swap. Godex returns address and extra id (if needed) to deposit to, final amount, fee and some other parameters.

To receive affiliate bonuses from transaction, the next parameter should be Included in the API query: affiliate_id.

Parameters

Parameter Type Status Description
coin_from string required Coin code from
coin_to string required Coin code to
deposit_amount numeric required Amount to be exchanged
withdrawal string required Destination address, it is used for sending exchanged coins
withdrawal_extra_id string optional Additional ID for destination wallet addresses of currencies that use extra ID for transaction processing
return string optional The address user sends coins from, or another one that may be used as a refund address, if it is necessary
return_extra_id string optional Additional ID for refund wallet addresses of currencies that use extra ID for transaction processing
coin_from_network string optional Network name of coin from
coin_to_network string optional Network name of coin to

Response

Name Type Description
transaction_id string Unique identifier for transaction assigned by godex
status string Transaction status is used to notify user about progress of the exchange process. See *transaction statuses for detailed description
coin_from string Coin to exchange from
coin_to string Coin to exchange to
deposit_amount float Amount of coins to be exchanged, specified by user
withdrawal_amount float This is expected amount that user will receive when exchange is completed
deposit string Deposit address to which user sends the currency
deposit_extra_id string|null Additional ID for deposit wallet addresses of currencies that use extra ID for transaction processing. Important: sending coins without using extra id (when it is provided) may result in money loss!
withdrawal string Destination address, it is used for sending exchanged coins
withdrawal_extra_id string|null Additional ID for destination wallet addresses of currencies that use extra ID for transaction processing
rate float Current exchange rate offered by godex
fee float Service fee (in destination currency)
return string The address user sends coins from, or another one that may be used as a refund address, if it is necessary
return_extra_id string|null Additional ID for refund wallet addresses of currencies that use extra ID for transaction processing
final_amount float It differs from withdrawal_amount if real deposit amount is not equal to amount specified by user. In this case, user receives this amount.
hash_in string Incoming transaction hash
hash_out string Outcoming transaction hash

Create Transaction Revert (by withdrawal amount)

Example request:


curl -X POST "https://api.godex.io/api/v1/transaction-revert" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{ "coin_from": "LTC", "coin_to": "ETH", "withdrawal_amount": "1", "withdrawal": "0x0", "withdrawal_extra_id": null, "affiliate_id": "yWSiyDh93J7NPDNY" }'
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/transaction-revert",
    "method": "POST",
    "data": {
        "coin_from": "LTC",
        "coin_to": "ETH",
        "withdrawal_amount": 1,
        "withdrawal": "0x0",
        "withdrawal_extra_id": null,
        "affiliate_id": "yWSiyDh93J7NPDNY"
},
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

        $requestHeaders = [
            'Content-type: application/json'
        ];
        $ch = curl_init('https://api.godex.io/api/v1/transaction-revert');
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
                "coin_from" : "LTC",
                "coin_to":"ETH",
                "withdrawal_amount": 1,
                "withdrawal": "0x0",
                "withdrawal_extra_id": null,
                "affiliate_id": yWSiyDh93J7NPDNY])
                );
        curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);

The above command returns JSON structured like default request click here

HTTP Request

POST api/v1/transaction-revert

Same us Create Transaction, but without "deposit_amount" and required "withdrawal_amount".

Parameters

Parameter Type Status Description
deposit_amount numeric required Amount to be exchanged
withdrawal_amount numeric required Amount to be received

Response

Same us Create Transaction

Get Transaction

Example request:


curl -X GET "https://api.godex.io/api/v1/transaction/{id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" 
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/transaction/{id}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

$requestHeaders = ['Content-type: application/json'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.godex.io/api/v1/transaction/{id}');
curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);

Example response:

{
      "status": "wait",
      "transaction_id": "fb43d8da477as3e375",
      "coin_from": "ETH",
      "coin_to": "BTC",
      "deposit_amount": 4,
      "withdrawal_amount": 0.35552848,
      "rate": 0.08931962,
      "fee": 0.00175,
      "deposit": "0xbf595543984538e606e94ac1644cb63b69273d506dffb334",
      "deposit_extra_id": null,
      "withdrawal": "LcXGHfldb5szxJtj6d3fvY6btD3FA7V7f4L8GsoG4io",
      "withdrawal_extra_id": null,
      "return": "DJHda6CherXgE4R9xU52pnt36y3M8oYiWRndfsvopqgf",
      "return_extra_id": null,
      "hash_in": null,
      "hash_out": null,
      "real_deposit_amount": 0.021020074485,
      "real_withdrawal_amount": 0.021020074485,
   }

HTTP Request

GET api/v1/transaction/{id}

Gets detailed information about a single transaction. One of returned parameters is ‘rate’, which is current rate offered by godex. It may differ from market rate, and also may change rapidly depending on the markets.

Options:

Name Type Description
id required|string Unique identifier for transaction assigned by godex

Response:

Name Type Description
transaction_id string Unique identifier for transaction assigned by godex
status string Transaction status is used to notify user about progress of the exchange process. See *transaction statuses for detailed description
coin_from string Coin to exchange from
coin_to string Coin to exchange to
deposit_amount float Amount of coins to be exchanged, specified by user
withdrawal_amount float This is expected amount that user will receive when exchange is completed
deposit string Deposit address to which user sends the currency
deposit_extra_id string|null Additional ID for deposit wallet addresses of currencies that use extra ID for transaction processing. Important: sending coins without using extra id (when it is provided) may result in money loss!
withdrawal string Destination address, it is used for sending exchanged coins
withdrawal_extra_id string|null Additional ID for destination wallet addresses of currencies that use extra ID for transaction processing
rate float Current exchange rate offered by godex
fee float Service fee (in destination currency)
return string The address user sends coins from, or another one that may be used as a refund address, if it is necessary
return_extra_id string|null Additional ID for refund wallet addresses of currencies that use extra ID for transaction processing
return_extra_id string|null Additional ID for refund wallet addresses of currencies that use extra ID for transaction processing
final_amount string|null It differs from withdrawal_amount if real deposit amount is not equal to amount specified by user. In this case, user receives this amount.
hash_in string|null Incoming transaction hash
hash_out string|null Outcoming transaction hash
real_deposit_amount string|null Displays received deposit amount. It may differ from the amount specified by user.
real_withdrawal_amount string|null If the received deposit is different, the final amount is being recalculated using the same rate.
execution_time string|null The time in seconds spent on the exchange. It is measured from the moment funds are received until the output transaction is sent to the recipient’s wallet.

Get List of Transactions

Example request:


curl -X GET "https://api.godex.io/api/v1/transactions/{id},{id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" 
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/transactions/{id},{id}",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

$requestHeaders = ['Content-type: application/json'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.godex.io/api/v1/transactions/{id},{id}');
curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);

Example response:


[
  {
      "status": "wait",
      "transaction_id": "fb43d8da477as3e375",
      "coin_from": "ETH",
      "coin_to": "BTC",
      "deposit_amount": 4,
      "withdrawal_amount": 0.35552848,
      "rate": 0.08931962,
      "fee": 0.00175,
      "deposit": "0xbf595543984538e606e94ac1644cb63b69273d506dffb334",
      "deposit_extra_id": null,
      "withdrawal": "LcXGHfldb5szxJtj6d3fvY6btD3FA7V7f4L8GsoG4io",
      "withdrawal_extra_id": null,
      "return": "DJHda6CherXgE4R9xU52pnt36y3M8oYiWRndfsvopqgf",
      "return_extra_id": null,
      "hash_in": null,
      "hash_out": null,
      "real_deposit_amount": 0.021020074485,
      "real_withdrawal_amount": 0.021020074485,
  },
  {
      "status": "wait",
      "transaction_id": "ol43d8da477as3n8te",
      "coin_from": "ETH",
      "coin_to": "BTC",
      "deposit_amount": 4,
      "withdrawal_amount": 0.35552848,
      "rate": 0.08931962,
      "fee": 0.00175,
      "deposit": "0xbf595543984538e606e94ac1644cb63b69273d506dffb334",
      "deposit_extra_id": null,
      "withdrawal": "LcXGHfldb5szxJtj6d3fvY6btD3FA7V7f4L8GsoG4io",
      "withdrawal_extra_id": null,
      "return": "DJHda6CherXgE4R9xU52pnt36y3M8oYiWRndfsvopqgf",
      "return_extra_id": null,
      "hash_in": null,
      "hash_out": null,
      "real_deposit_amount": 0.021020074485,
      "real_withdrawal_amount": 0.021020074485,
  }
]
            

HTTP Request

GET api/v1/transactions/{id},{id}

Returns detailed information about multiple transactions. The unique transaction identifiers are separated by commas.

Options:

Name Type Description
id required|string Unique identifier for transaction assigned by godex

Response:

Name Type Description
transaction_id string Unique identifier for transaction assigned by godex
status string Transaction status is used to notify user about progress of the exchange process. See *transaction statuses for detailed description
coin_from string Coin to exchange from
coin_to string Coin to exchange to
deposit_amount float Amount of coins to be exchanged, specified by user
withdrawal_amount float This is expected amount that user will receive when exchange is completed
deposit string Deposit address to which user sends the currency
deposit_extra_id string|null Additional ID for deposit wallet addresses of currencies that use extra ID for transaction processing. Important: sending coins without using extra id (when it is provided) may result in money loss!
withdrawal string Destination address, it is used for sending exchanged coins
withdrawal_extra_id string|null Additional ID for destination wallet addresses of currencies that use extra ID for transaction processing
rate float Current exchange rate offered by godex
fee float Service fee (in destination currency)
return string The address user sends coins from, or another one that may be used as a refund address, if it is necessary
return_extra_id string|null Additional ID for refund wallet addresses of currencies that use extra ID for transaction processing
return_extra_id string|null Additional ID for refund wallet addresses of currencies that use extra ID for transaction processing
final_amount string|null It differs from withdrawal_amount if real deposit amount is not equal to amount specified by user. In this case, user receives this amount.
hash_in string|null Incoming transaction hash
hash_out string|null Outcoming transaction hash
real_deposit_amount string|null Displays received deposit amount. It may differ from the amount specified by user.
real_withdrawal_amount string|null If the received deposit is different, the final amount is being recalculated using the same rate.
execution_time string|null The time in seconds spent on the exchange. It is measured from the moment funds are received until the output transaction is sent to the recipient’s wallet.

Transaction Status

Example request:


curl -X GET "https://api.godex.io/api/v1/transaction/5bb38dea41f88/status" \
-H "Accept: application/json" \
-H "Content-Type: application/json"
            
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/transaction/{id}/status",
    "method": "GET",
    "headers": {
        "accept": "application/json"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

$requestHeaders = ['Content-type: application/json'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.godex.io/api/v1/transaction/{id}/status');
curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
            

Example response:

status

HTTP Request

GET api/v1/transaction/{id}/status

Allows to check the current status of the transaction as a string.

Options:

Name Type Description
id required|string Unique identifier for transaction assigned by godex

Response:

Return transaction status

User Info

In order to use these API requests you must have an authorization token. You can receive in your godex account settings or contact the support.

Get Balance

Example request:

curl -X GET "https://api.godex.io/api/v1/balance" \
-H "Content-Type: application/json" \
-H "public-key: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/balance",
    "method": "GET",
    "headers": {
        "accept": "application/json"
        "public-key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});
$requestHeaders = ['Content-type: application/json', 'Content-type: application/json', 'public-key: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.godex.io/api/v1/balance');
curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);

Example response:

100,00

HTTP Request

GET api/v1/balance

Represents the current user’s accumulated balance in BTC.

Options:

Parameters are not needed, but it requires Authorization api key.

Answer:

Will return the current balance in the string

Get a balance story

Example request:

curl -X GET "https://api.godex.io/api/v1/history" \
-H "Content-Type: application/json" \
-H "public-key: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/history",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "public-key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});
$requestHeaders = ['Content-type: application/json', 'public-key: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.godex.io/api/v1/history');
curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);

Example response:

    [
      {
        "amount": "0.35552848",
        "type": "transaction",
        "source_id": "72cb3f954cff",
        "created_at": "2018-09-17 04:48:35",
      },
      {
        "amount": "0.2187264",
        "type": "affiliate",
        "source_id": "b0c6cd6ccc90",
        "created_at": "2018-09-15 04:48:35",
      },
        {
        "amount": "0.1034893",
        "type": "withdrawal",
        "source_id": "eedb9a09356e",
        "created_at": "2018-09-13 10:50:34",
      }
    ]

HTTP Request

GET api/v1/history

Gets the history of the user's balance changes. This can be accrual of funds from the affiliate program, from user's transactions, and also withdrawals. In addition it returns the transaction ID and the date of a specific balance change

Options:

Parameters are not needed, but it requires Authorization api key.

Response:

array of objects

Name Type Description
amount float Balance change
type string Type of balance change: Transaction - income from exchange made by user; Affiliate - income from exchange made by affiliate link Withdrawal - funds withdrawal
source_id int Unique identifier for transaction assigned by godex
created_at string Date and time when transaction was created

Get All Transaction

Example request:


curl -X GET "https://api.godex.io/api/v1/transactions" \
-H "Content-Type: application/json" \
-H "public-key: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/transactions",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "public-key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij"

    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

$requestHeaders = ['Content-type: application/json, 'Content-type: application/json', 'public-key: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.godex.io/api/v1/transactions');
curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);

Example response:

    [
      {
        "transaction_id": "5b758efb69fbaYjef",
        "status": "wait",
        "coin_from": "BTC",
        "coin_to": "ETH",
        "deposit_amount": "1",
        "withdrawal_amount": "0.04342730",
        "deposit": "",
        "withdrawal": "37ZdZAQgKiuyKENJjJK1XfJmgJ3HFcEiorScaVx",
        "created_at": "2018-08-17 14:52:32"
      },
      {
        "transaction_id": "5bsp76a6dfw1b54046",
        "status": "wait",
        "coin_from": "XEM",
        "coin_to": "XRP",
        "deposit_amount": "300",
        "withdrawal_amount": "101.46818249",
        "deposit": "",
        "withdrawal": "Udfk883JF38MVlvdfsqp46kvHJMlw",
        "created_at": "2018-08-17 10:40:27"
      }
    ]

HTTP Request

GET api/v1/transactions

Gets an array, containing list of all transactions and their parameters, like transaction id, status, coin pair, date of creation and others.

Options:

Parameters are not needed, but it requires Authorization api key.

Answer:

array of objects

Name Type Description
transaction_id string Unique identifier for transaction assigned by godex
status string Transaction status
coin_from string Coin code from
coin_to string Coin code to
deposit_amount float Amount of coins to be exchanged, specified by user
withdrawal_amount float This is expected amount that user will receive when exchange is completed
deposit string Deposit address to which user sends the currency
withdrawal string The address user sends coins from.
created_at Date and time when transaction was created

Get Affiliate Transactions

Example request:


curl -X GET "https://api.godex.io/api/v1/affiliate/history" \
-H "Content-Type: application/json" \
-H "public-key: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/affiliate/history",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "public-key": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij"

    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});

$requestHeaders = ['Content-type: application/json, 'Content-type: application/json', 'public-key: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ij'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.godex.io/api/v1/affiliate/history');
curl_setopt($ch, CURLOPT_HTTPHEADER, $requestHeaders);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);

Example response:

    [
      {
        "transaction_id": "5b758efb69fbaYjef",
        "status": "wait",
        "coin_from": "BTC",
        "coin_to": "ETH",
        "deposit_amount": "1",
        "withdrawal_amount": "0.04342730",
        "deposit": "",
        "withdrawal": "37ZdZAQgKiuyKENJjJK1XfJmgJ3HFcEiorScaVx",
        "rate": "29.43135400",
        "fee": "0",
        "user_id": "33",
        "affiliate_id": "KUZ6fSFVnmTaVIRW",
        "created_at": "2018-08-17 14:52:32"
      },
      {
        "transaction_id": "5bsp76a6dfw1b54046",
        "status": "wait",
        "coin_from": "XEM",
        "coin_to": "XRP",
        "deposit_amount": "300",
        "withdrawal_amount": "101.46818249",
        "deposit": "",
        "withdrawal": "Udfk883JF38MVlvdfsqp46kvHJMlw",
        "rate": "29.43135400",
        "fee": "0",
        "user_id": "33",
        "affiliate_id": "KUZ6fSFVnmTaVIRW",
        "created_at": "2018-08-17 10:40:27"
      }
    ]

HTTP Request

GET api/v1/affiliate/history

Returns the array of data for transactions made by the user with the specific affiliate id.

Options:

Parameters are not needed, but it requires Authorization api key.

Name Type Description
coin_from (Optional) string Ticker for a currency from
coin_to (Optional) string Ticker for a destination currency
status (Optional) string Transaction status (see the list of available statuses)
limit (Optional) integer Amount of transactions to be displayed (default: 10)
offset (Optional) integer Number of transactions to skip

Answer:

array of objects

Name Type Description
transaction_id string Unique identifier for transaction assigned by godex
status string Transaction status
coin_from string Coin code from
coin_to string Coin code to
deposit_amount float Amount of coins to be exchanged, specified by user
withdrawal_amount float This is expected amount that user will receive when exchange is completed
deposit string Deposit address to which user sends the currency
withdrawal string The address user sends coins from.
created_at Date and time when transaction was created