NAV
bash javascript

Introducing Godex 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:

Authorization: Bearer OAuth token

Bearer OAuth token can be obtained in the user's personal account or by sending a request to Godex support (support@godex.io).

Bearer Authorization token is a user's identifier, and if it is specified in the API request, or stored in the browser cache (when using site UI), the transaction made with this token is considered as a transaction made by the user himself, and accordingly the user will not receive an affiliate share from it. In order to receive a revenue from transactions conducted through your API, you should not use Bearer Authorization token in your "Create Transaction" requests. 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
}

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

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" }'
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",
        "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');
        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])
                );
        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.

API authorization is not mandatory here, but to assign transaction to the particular user, it is necessary to be authorized.

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

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

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 "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGRhMWRkYjQ2ODQyMTZiYmMzYzM0YmM3NjJlNTNmNmQ0NTUzYWFiYzgxNzA4NGIzZTQxMDMyNmIyOTQ0Y2Q4NzYwZmZhNzBhY2I3NjBlIn0.eyJhdWQiOiIxIiwianRpIjoiOWM4ZGExZGRiNDY4NDIxNmJiYzNjMzRiYzc2MmU1M2Y2ZDQ1NTNhYWJjODE3MDg0YjNlNDEwMzI2YjI5NDRjZDg3NjBmZmE3MGFjYjc2MGUiLCJpYXQiOjE1Mzg1NzI0NDksIm5iZiI6MTUzODU3MjQ0OSwiZXhwIjoxODU0MTkxNjQ5LCJzdWIiOiIxOCIsInNjb3BlcyI6W119.NWmWHZXj7_7qNcE4Ij-XFOIV3JY1qTU2_-WMshUp4UffZIDMTohODJahFSx4m-_gUZ2RQaBi9o04P4YERKxMHvUsqa_jJv5aC3TuVTJ5HlJC37zaiwWlTIYNxM-dwraXQqeB8tzrQ8HZ4HYRZl3zQoivD8-QZuA-cu9ESi3-TKT6WXD5ANXT1i77_-VEDaUxmXYAH0jZ8LjCY58xeNb5Eii73VdRAjdTm1RzqBF57Z24Yo4veHqAOrjDlfeF0RpYSPOCOwwgKy5oO4gSioW6dYj1Xdnybj8YP4J8aKp5PE_yv5NuUPPFBWmX_fG3if8lbGMlPiwpewBi_HLyQGlUk65qSqxNM7kU_HSz5RKPe1iHDmrkBu0LWG2pbmOciywr-Jprdi0KJh5L6dkBwqhqzAtvh6G3195P4v5-urD3iuk9VsycCdWfpnBbK-odW2mCmbcJ4Y2AOThgXAAZRX2tbeLl2HatGJhsrYHMDwOr5ugiOB_qOu5g6_v1aWiIu7DWIHJHPOWUgDEiooOJR68OOz2PJdQ22vZGa0ufoUniPYTXfwdJufmf2JZrAccVpJOESvHrN-eLPWH0kPsx10xvfkiz8ypLPDo_23mZ9jQJhmZiagrVvHwsKxG4WbYfW7SAdl04o2NQiH5CA5ckK2Jl8NFr16-RL9qZujZJovilOTY"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/balance",
    "method": "GET",
    "headers": {
        "accept": "application/json"
        "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGRhMWRkYjQ2ODQyMTZiYmMzYzM0YmM3NjJlNTNmNmQ0NTUzYWFiYzgxNzA4NGIzZTQxMDMyNmIyOTQ0Y2Q4NzYwZmZhNzBhY2I3NjBlIn0.eyJhdWQiOiIxIiwianRpIjoiOWM4ZGExZGRiNDY4NDIxNmJiYzNjMzRiYzc2MmU1M2Y2ZDQ1NTNhYWJjODE3MDg0YjNlNDEwMzI2YjI5NDRjZDg3NjBmZmE3MGFjYjc2MGUiLCJpYXQiOjE1Mzg1NzI0NDksIm5iZiI6MTUzODU3MjQ0OSwiZXhwIjoxODU0MTkxNjQ5LCJzdWIiOiIxOCIsInNjb3BlcyI6W119.NWmWHZXj7_7qNcE4Ij-XFOIV3JY1qTU2_-WMshUp4UffZIDMTohODJahFSx4m-_gUZ2RQaBi9o04P4YERKxMHvUsqa_jJv5aC3TuVTJ5HlJC37zaiwWlTIYNxM-dwraXQqeB8tzrQ8HZ4HYRZl3zQoivD8-QZuA-cu9ESi3-TKT6WXD5ANXT1i77_-VEDaUxmXYAH0jZ8LjCY58xeNb5Eii73VdRAjdTm1RzqBF57Z24Yo4veHqAOrjDlfeF0RpYSPOCOwwgKy5oO4gSioW6dYj1Xdnybj8YP4J8aKp5PE_yv5NuUPPFBWmX_fG3if8lbGMlPiwpewBi_HLyQGlUk65qSqxNM7kU_HSz5RKPe1iHDmrkBu0LWG2pbmOciywr-Jprdi0KJh5L6dkBwqhqzAtvh6G3195P4v5-urD3iuk9VsycCdWfpnBbK-odW2mCmbcJ4Y2AOThgXAAZRX2tbeLl2HatGJhsrYHMDwOr5ugiOB_qOu5g6_v1aWiIu7DWIHJHPOWUgDEiooOJR68OOz2PJdQ22vZGa0ufoUniPYTXfwdJufmf2JZrAccVpJOESvHrN-eLPWH0kPsx10xvfkiz8ypLPDo_23mZ9jQJhmZiagrVvHwsKxG4WbYfW7SAdl04o2NQiH5CA5ckK2Jl8NFr16-RL9qZujZJovilOTY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});
$requestHeaders = ['Content-type: application/json', 'Content-type: application/json', 'Authorization: Bearer 080042cad6356ad5dc0a720c18b53b8e53d4c274'];
$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 "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGRhMWRkYjQ2ODQyMTZiYmMzYzM0YmM3NjJlNTNmNmQ0NTUzYWFiYzgxNzA4NGIzZTQxMDMyNmIyOTQ0Y2Q4NzYwZmZhNzBhY2I3NjBlIn0.eyJhdWQiOiIxIiwianRpIjoiOWM4ZGExZGRiNDY4NDIxNmJiYzNjMzRiYzc2MmU1M2Y2ZDQ1NTNhYWJjODE3MDg0YjNlNDEwMzI2YjI5NDRjZDg3NjBmZmE3MGFjYjc2MGUiLCJpYXQiOjE1Mzg1NzI0NDksIm5iZiI6MTUzODU3MjQ0OSwiZXhwIjoxODU0MTkxNjQ5LCJzdWIiOiIxOCIsInNjb3BlcyI6W119.NWmWHZXj7_7qNcE4Ij-XFOIV3JY1qTU2_-WMshUp4UffZIDMTohODJahFSx4m-_gUZ2RQaBi9o04P4YERKxMHvUsqa_jJv5aC3TuVTJ5HlJC37zaiwWlTIYNxM-dwraXQqeB8tzrQ8HZ4HYRZl3zQoivD8-QZuA-cu9ESi3-TKT6WXD5ANXT1i77_-VEDaUxmXYAH0jZ8LjCY58xeNb5Eii73VdRAjdTm1RzqBF57Z24Yo4veHqAOrjDlfeF0RpYSPOCOwwgKy5oO4gSioW6dYj1Xdnybj8YP4J8aKp5PE_yv5NuUPPFBWmX_fG3if8lbGMlPiwpewBi_HLyQGlUk65qSqxNM7kU_HSz5RKPe1iHDmrkBu0LWG2pbmOciywr-Jprdi0KJh5L6dkBwqhqzAtvh6G3195P4v5-urD3iuk9VsycCdWfpnBbK-odW2mCmbcJ4Y2AOThgXAAZRX2tbeLl2HatGJhsrYHMDwOr5ugiOB_qOu5g6_v1aWiIu7DWIHJHPOWUgDEiooOJR68OOz2PJdQ22vZGa0ufoUniPYTXfwdJufmf2JZrAccVpJOESvHrN-eLPWH0kPsx10xvfkiz8ypLPDo_23mZ9jQJhmZiagrVvHwsKxG4WbYfW7SAdl04o2NQiH5CA5ckK2Jl8NFr16-RL9qZujZJovilOTY"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/history",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGRhMWRkYjQ2ODQyMTZiYmMzYzM0YmM3NjJlNTNmNmQ0NTUzYWFiYzgxNzA4NGIzZTQxMDMyNmIyOTQ0Y2Q4NzYwZmZhNzBhY2I3NjBlIn0.eyJhdWQiOiIxIiwianRpIjoiOWM4ZGExZGRiNDY4NDIxNmJiYzNjMzRiYzc2MmU1M2Y2ZDQ1NTNhYWJjODE3MDg0YjNlNDEwMzI2YjI5NDRjZDg3NjBmZmE3MGFjYjc2MGUiLCJpYXQiOjE1Mzg1NzI0NDksIm5iZiI6MTUzODU3MjQ0OSwiZXhwIjoxODU0MTkxNjQ5LCJzdWIiOiIxOCIsInNjb3BlcyI6W119.NWmWHZXj7_7qNcE4Ij-XFOIV3JY1qTU2_-WMshUp4UffZIDMTohODJahFSx4m-_gUZ2RQaBi9o04P4YERKxMHvUsqa_jJv5aC3TuVTJ5HlJC37zaiwWlTIYNxM-dwraXQqeB8tzrQ8HZ4HYRZl3zQoivD8-QZuA-cu9ESi3-TKT6WXD5ANXT1i77_-VEDaUxmXYAH0jZ8LjCY58xeNb5Eii73VdRAjdTm1RzqBF57Z24Yo4veHqAOrjDlfeF0RpYSPOCOwwgKy5oO4gSioW6dYj1Xdnybj8YP4J8aKp5PE_yv5NuUPPFBWmX_fG3if8lbGMlPiwpewBi_HLyQGlUk65qSqxNM7kU_HSz5RKPe1iHDmrkBu0LWG2pbmOciywr-Jprdi0KJh5L6dkBwqhqzAtvh6G3195P4v5-urD3iuk9VsycCdWfpnBbK-odW2mCmbcJ4Y2AOThgXAAZRX2tbeLl2HatGJhsrYHMDwOr5ugiOB_qOu5g6_v1aWiIu7DWIHJHPOWUgDEiooOJR68OOz2PJdQ22vZGa0ufoUniPYTXfwdJufmf2JZrAccVpJOESvHrN-eLPWH0kPsx10xvfkiz8ypLPDo_23mZ9jQJhmZiagrVvHwsKxG4WbYfW7SAdl04o2NQiH5CA5ckK2Jl8NFr16-RL9qZujZJovilOTY"
    }
}

$.ajax(settings).done(function (response) {
    console.log(response);
});
$requestHeaders = ['Content-type: application/json', 'Authorization: Bearer 080042cad6356ad5dc0a720c18b53b8e53d4c274'];
$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 "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGRhMWRkYjQ2ODQyMTZiYmMzYzM0YmM3NjJlNTNmNmQ0NTUzYWFiYzgxNzA4NGIzZTQxMDMyNmIyOTQ0Y2Q4NzYwZmZhNzBhY2I3NjBlIn0.eyJhdWQiOiIxIiwianRpIjoiOWM4ZGExZGRiNDY4NDIxNmJiYzNjMzRiYzc2MmU1M2Y2ZDQ1NTNhYWJjODE3MDg0YjNlNDEwMzI2YjI5NDRjZDg3NjBmZmE3MGFjYjc2MGUiLCJpYXQiOjE1Mzg1NzI0NDksIm5iZiI6MTUzODU3MjQ0OSwiZXhwIjoxODU0MTkxNjQ5LCJzdWIiOiIxOCIsInNjb3BlcyI6W119.NWmWHZXj7_7qNcE4Ij-XFOIV3JY1qTU2_-WMshUp4UffZIDMTohODJahFSx4m-_gUZ2RQaBi9o04P4YERKxMHvUsqa_jJv5aC3TuVTJ5HlJC37zaiwWlTIYNxM-dwraXQqeB8tzrQ8HZ4HYRZl3zQoivD8-QZuA-cu9ESi3-TKT6WXD5ANXT1i77_-VEDaUxmXYAH0jZ8LjCY58xeNb5Eii73VdRAjdTm1RzqBF57Z24Yo4veHqAOrjDlfeF0RpYSPOCOwwgKy5oO4gSioW6dYj1Xdnybj8YP4J8aKp5PE_yv5NuUPPFBWmX_fG3if8lbGMlPiwpewBi_HLyQGlUk65qSqxNM7kU_HSz5RKPe1iHDmrkBu0LWG2pbmOciywr-Jprdi0KJh5L6dkBwqhqzAtvh6G3195P4v5-urD3iuk9VsycCdWfpnBbK-odW2mCmbcJ4Y2AOThgXAAZRX2tbeLl2HatGJhsrYHMDwOr5ugiOB_qOu5g6_v1aWiIu7DWIHJHPOWUgDEiooOJR68OOz2PJdQ22vZGa0ufoUniPYTXfwdJufmf2JZrAccVpJOESvHrN-eLPWH0kPsx10xvfkiz8ypLPDo_23mZ9jQJhmZiagrVvHwsKxG4WbYfW7SAdl04o2NQiH5CA5ckK2Jl8NFr16-RL9qZujZJovilOTY"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/transactions",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGRhMWRkYjQ2ODQyMTZiYmMzYzM0YmM3NjJlNTNmNmQ0NTUzYWFiYzgxNzA4NGIzZTQxMDMyNmIyOTQ0Y2Q4NzYwZmZhNzBhY2I3NjBlIn0.eyJhdWQiOiIxIiwianRpIjoiOWM4ZGExZGRiNDY4NDIxNmJiYzNjMzRiYzc2MmU1M2Y2ZDQ1NTNhYWJjODE3MDg0YjNlNDEwMzI2YjI5NDRjZDg3NjBmZmE3MGFjYjc2MGUiLCJpYXQiOjE1Mzg1NzI0NDksIm5iZiI6MTUzODU3MjQ0OSwiZXhwIjoxODU0MTkxNjQ5LCJzdWIiOiIxOCIsInNjb3BlcyI6W119.NWmWHZXj7_7qNcE4Ij-XFOIV3JY1qTU2_-WMshUp4UffZIDMTohODJahFSx4m-_gUZ2RQaBi9o04P4YERKxMHvUsqa_jJv5aC3TuVTJ5HlJC37zaiwWlTIYNxM-dwraXQqeB8tzrQ8HZ4HYRZl3zQoivD8-QZuA-cu9ESi3-TKT6WXD5ANXT1i77_-VEDaUxmXYAH0jZ8LjCY58xeNb5Eii73VdRAjdTm1RzqBF57Z24Yo4veHqAOrjDlfeF0RpYSPOCOwwgKy5oO4gSioW6dYj1Xdnybj8YP4J8aKp5PE_yv5NuUPPFBWmX_fG3if8lbGMlPiwpewBi_HLyQGlUk65qSqxNM7kU_HSz5RKPe1iHDmrkBu0LWG2pbmOciywr-Jprdi0KJh5L6dkBwqhqzAtvh6G3195P4v5-urD3iuk9VsycCdWfpnBbK-odW2mCmbcJ4Y2AOThgXAAZRX2tbeLl2HatGJhsrYHMDwOr5ugiOB_qOu5g6_v1aWiIu7DWIHJHPOWUgDEiooOJR68OOz2PJdQ22vZGa0ufoUniPYTXfwdJufmf2JZrAccVpJOESvHrN-eLPWH0kPsx10xvfkiz8ypLPDo_23mZ9jQJhmZiagrVvHwsKxG4WbYfW7SAdl04o2NQiH5CA5ckK2Jl8NFr16-RL9qZujZJovilOTY"

    }
}

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

$requestHeaders = ['Content-type: application/json, 'Content-type: application/json', 'Authorization: Bearer 080042cad6356ad5dc0a720c18b53b8e53d4c274'];
$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

Parameters are not needed, but it requires Authorization api key (include following parameters in headers).

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 "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGRhMWRkYjQ2ODQyMTZiYmMzYzM0YmM3NjJlNTNmNmQ0NTUzYWFiYzgxNzA4NGIzZTQxMDMyNmIyOTQ0Y2Q4NzYwZmZhNzBhY2I3NjBlIn0.eyJhdWQiOiIxIiwianRpIjoiOWM4ZGExZGRiNDY4NDIxNmJiYzNjMzRiYzc2MmU1M2Y2ZDQ1NTNhYWJjODE3MDg0YjNlNDEwMzI2YjI5NDRjZDg3NjBmZmE3MGFjYjc2MGUiLCJpYXQiOjE1Mzg1NzI0NDksIm5iZiI6MTUzODU3MjQ0OSwiZXhwIjoxODU0MTkxNjQ5LCJzdWIiOiIxOCIsInNjb3BlcyI6W119.NWmWHZXj7_7qNcE4Ij-XFOIV3JY1qTU2_-WMshUp4UffZIDMTohODJahFSx4m-_gUZ2RQaBi9o04P4YERKxMHvUsqa_jJv5aC3TuVTJ5HlJC37zaiwWlTIYNxM-dwraXQqeB8tzrQ8HZ4HYRZl3zQoivD8-QZuA-cu9ESi3-TKT6WXD5ANXT1i77_-VEDaUxmXYAH0jZ8LjCY58xeNb5Eii73VdRAjdTm1RzqBF57Z24Yo4veHqAOrjDlfeF0RpYSPOCOwwgKy5oO4gSioW6dYj1Xdnybj8YP4J8aKp5PE_yv5NuUPPFBWmX_fG3if8lbGMlPiwpewBi_HLyQGlUk65qSqxNM7kU_HSz5RKPe1iHDmrkBu0LWG2pbmOciywr-Jprdi0KJh5L6dkBwqhqzAtvh6G3195P4v5-urD3iuk9VsycCdWfpnBbK-odW2mCmbcJ4Y2AOThgXAAZRX2tbeLl2HatGJhsrYHMDwOr5ugiOB_qOu5g6_v1aWiIu7DWIHJHPOWUgDEiooOJR68OOz2PJdQ22vZGa0ufoUniPYTXfwdJufmf2JZrAccVpJOESvHrN-eLPWH0kPsx10xvfkiz8ypLPDo_23mZ9jQJhmZiagrVvHwsKxG4WbYfW7SAdl04o2NQiH5CA5ckK2Jl8NFr16-RL9qZujZJovilOTY"
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://api.godex.io/api/v1/affiliate/history",
    "method": "GET",
    "headers": {
        "accept": "application/json",
        "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjljOGRhMWRkYjQ2ODQyMTZiYmMzYzM0YmM3NjJlNTNmNmQ0NTUzYWFiYzgxNzA4NGIzZTQxMDMyNmIyOTQ0Y2Q4NzYwZmZhNzBhY2I3NjBlIn0.eyJhdWQiOiIxIiwianRpIjoiOWM4ZGExZGRiNDY4NDIxNmJiYzNjMzRiYzc2MmU1M2Y2ZDQ1NTNhYWJjODE3MDg0YjNlNDEwMzI2YjI5NDRjZDg3NjBmZmE3MGFjYjc2MGUiLCJpYXQiOjE1Mzg1NzI0NDksIm5iZiI6MTUzODU3MjQ0OSwiZXhwIjoxODU0MTkxNjQ5LCJzdWIiOiIxOCIsInNjb3BlcyI6W119.NWmWHZXj7_7qNcE4Ij-XFOIV3JY1qTU2_-WMshUp4UffZIDMTohODJahFSx4m-_gUZ2RQaBi9o04P4YERKxMHvUsqa_jJv5aC3TuVTJ5HlJC37zaiwWlTIYNxM-dwraXQqeB8tzrQ8HZ4HYRZl3zQoivD8-QZuA-cu9ESi3-TKT6WXD5ANXT1i77_-VEDaUxmXYAH0jZ8LjCY58xeNb5Eii73VdRAjdTm1RzqBF57Z24Yo4veHqAOrjDlfeF0RpYSPOCOwwgKy5oO4gSioW6dYj1Xdnybj8YP4J8aKp5PE_yv5NuUPPFBWmX_fG3if8lbGMlPiwpewBi_HLyQGlUk65qSqxNM7kU_HSz5RKPe1iHDmrkBu0LWG2pbmOciywr-Jprdi0KJh5L6dkBwqhqzAtvh6G3195P4v5-urD3iuk9VsycCdWfpnBbK-odW2mCmbcJ4Y2AOThgXAAZRX2tbeLl2HatGJhsrYHMDwOr5ugiOB_qOu5g6_v1aWiIu7DWIHJHPOWUgDEiooOJR68OOz2PJdQ22vZGa0ufoUniPYTXfwdJufmf2JZrAccVpJOESvHrN-eLPWH0kPsx10xvfkiz8ypLPDo_23mZ9jQJhmZiagrVvHwsKxG4WbYfW7SAdl04o2NQiH5CA5ckK2Jl8NFr16-RL9qZujZJovilOTY"

    }
}

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

$requestHeaders = ['Content-type: application/json, 'Content-type: application/json', 'Authorization: Bearer 080042cad6356ad5dc0a720c18b53b8e53d4c274'];
$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.

It requires Bearer OAuth token.

Options:

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