1. Account Information

Get information about your account. Return an overview of:

1.    user email and username

2.    user sessions (active user sessions)

3.    funds ( available balance in all currencies)

4.    hold_funds ( balance in orders)

5.    wallets addresses ( numbers of wallets with exchange types)

6.    public keys (public key for each wallet if exist)

7.    Assets portfolio (funds, hold_funds, wallet address and public key for each asset)

8.    open orders ( count of open orders)

9.    server_time ( current server time)

endpoint: GetInfo

method: POST

 

Example:

$client->getInfo()

       

Result:

{ "success": 1, "data": { "email": "some_email@gmail.com", "username":"some_username", "userSessions": [{"ip":"46.164.189.25", "date":"2016-06-29 15:41:21", "created_at":"2016-06-28 20:30:28", "active":false}], funds": {"NXT": "8", "BTC": "0.018"}, hold_funds": { "NXT": "18", "BTC": "0"}, "wallets_addresses": {"NXT": "NXT-XXXX-XXXX-XXXX-XXXXX", "BTC": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}, "publick_key": {"NXT": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "BTC": "" }, "Assets portfolio": { "portfolio_price": 0, "frozen_portfolio_price": 0, "count": 1, "assets": [{ "wallets_adress": "NXT-XXXX-XXXX-XXXX-XXXXX", "publick_key":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "funds":"100"}]}, "open_orders": 0, "server_time": 1463346756}}

2. Active orders

Get information about active orders. Return an overview of:

1.    order id (order id in database)

2.    pair (currency pair contained in order record)

3.    type (order type: buy or sell)

4.    amount (the amount that remains to implement)

5.    rate (order price)

6.    order indicate (indicates that your order or not)

7.    timestamp (order creation time)

 

endpoint: ActiveOrders

method: POST

params:

  • pair: string to select an entry order currency pairs (optional, default: "ALL")
  • from: an integer value that represent number of records to be skipped before output (optional)
  • count: an integer value that represents the number of records that you want to display (optional, max: 50, default: 50)
  • from_id: an integer value which represent order_id, from which the output begins (optional)
  • end_id: an integer value that represents order_id after which the output ends (optional)
  • order: string to select the sort type (optional, default: "DESC")
  • since: UNIX timestamp that represents the time after which the output begins (optional)
  •  end: UNIX timestamp that represents the time after which the output ends (optional)
  • type: string to select the order type (optional, default: "ALL")
  •  owner: string to select the order owner (optional, default: "OWN")

 

The parameter pair can be "ALL", "BTC_NXT", "BTC_ETH" or any other pair that available right now. You can see the list of all available pairs calling public method markets

 The parameter order can be one of "ASC" or "DESC". Please note that all orders are sorted by ID.

Note, if you use parameters since or end parameter order will be set to "ASC".

The parameter type can be one of "BUY", "SELL", "ALL".

 The parameter owner can be one of "ALL" or  "OWN".

 

Method errors and their descriptions:

1.    Invalid Currency Pair - one of the currencies is empty or contains invalid characters or currency pair is not available

2.    Invalid Currency Code - currency code is not present  in the list of available

3.    Invalid From: not a positive number – parameter from is not a positive number

4.    Invalid Count: not a positive number – parameter count is not a positive number

5.    Invalid From ID: not a positive number – parameter from_id is not a positive number

6.    Invalid End ID: not a positive number – parameter end_id is not a positive number

7.    Invalid Since: not a UNIX timestamp – parameter since is not a valid UNIX timestamp

8.    Invalid End: not a UNIX timestamp – parameter end is not a valid UNIX timestamp

9.    Invalid Type - parameter type  is not equal to one of the available

10.  Invalid Owner -  parameter owner is not equal to one of the available

 

Example:

$client->getActiveOrders()

       

Result:

{"success": 1, "data": { "5303351":{ "pair":"BTC_NXT", "type":"buy", "amount":"0.1", "rate":"5321.1", "is_your_order":0, "timestamp":1464352941}, "5303391":{ "pair":"BTC_ETH", "type":"buy", "amount":"0.3", "rate":"5322.2", "is_your_order":0, "timestamp":1464352978}}}

 

3. Trade

Create orders for the purchase and sale. Return an overview of:

1.    funds (your wallet balance after operation)

2.   order_id (created order id)

 

endpoint: Trade

method: POST

params:

  • type: string to select the operation type
  • pair: string to select the operation currency pair
  •  amount: a positive float value which represent the amount that you want to buy or sell
  • rate: a positive float value which represent the order course

The parameter type can be one of "BUY" or "SELL".

 The parameter pair can be "BTC_NXT", "BTC_ETH" or any other pair that available right now. You can see the list of all available pairs calling public method markets

 

Method errors and their descriptions:

1.    Invalid Currency Pair – one of the currencies is empty or contains invalid characters or currency pair is not available

2.    Invalid Type – parameter type  is not equal to one of the available

3.    Invalid Currency Code – currency code is not present  in the list of available

4.    Selected Pair is disabled – operations for this pair are currently closed

5.    The amount field is required. – parameter amount is required

6.    The rate field is required. – parameter rate is required

7.    The amount must be a number. – parameter amount is not a positive number

8.    The rate must be a number. – parameter rate is not a positive number

9.    Not Enough "currency_code" – there is not enough money in this currency

10.  Minimum Order Amount is "min_amount" "currency_code" – parameter amount is less than the Minimum Order Amount

 

Example:

$client->setTrade("BUY", "BTC_NXT", "5000", "1")

Result:

{"success":1, "data": { "funds":{ "UAH": "4680.84", "BTC": "254.7", "NXT": "0"}, "order_id": 5616820}}

4. Cancel Order

Cancel selected order. Return an overview of:

1.    order_id (canceled order id)

2.    funds (your wallet balance after operation)

endpoint: CancelOrder

method: POST

params:

  • order_id: an integer value which represent canceled order_id

 

Method errors and their descriptions:

1.    Invalid Order ID – an error occurs in the following cases: if the parameter is not a numeric value, the parameter is not included, order is not yours or order is closed

2.   Order Pair is disabled – operations for this currency pair are currently closed

3.   Order Processed – order is in processing

Example:

$client->setCancelOrder()

Result:

{ "success":1, "data": { "funds":{ "UAH": "9680.84", "BTC": "254.7", "NXT": "0"}, "order_id":5616820}}

 

5. Trade History

Get information about all closed orders. Return an overview of:

1.     order id (order id in database)

2.    pair (currency pair contained in order record)

3.    type (order type: buy or sell)

4.    amount (the amount that remains to implement)

5.    rate (order price)

6.    order indicate (indicates that your order or not)

7.    timestamp (order creation time)

endpoint: TradeHistory

method: POST

params:

  • pair: string to select an entry order currency pairs (optional, default: "ALL")
  • from: an integer value that represent number of records to be skipped before output (optional)
  • count: an integer value that represents the number of records that you want to display (optional, max: 50, default: 50)
  •  from_id: an integer value which represent order_id, from which the output begins (optional)
  • end_id: an integer value that represents order_id after which the output ends (optional)
  • order: string to select the sort type (optional, default: "DESC")
  • since: UNIX timestamp that represents the time after which the output begins (optional)
  • end: UNIX timestamp that represents the time after which the output ends (optional)
  • status: an integer value which represent order_status_id (optional, default: 3)
  • owner: string to select the order owner (optional, default: "OWN")

 

The parameter pair can be "ALL", "BTC_NXT", "BTC_ETH" or any other pair that available right now. You can see the list of all available pairs calling public method markets

The parameter order can be one of "ASC" or "DESC". Please note that all orders are sorted by ID.

The parameter owner can be one of "ALL" or  "OWN".

Note, if you use parameters since or end parameter order will be set to "ASC".

The parameter status can be one of: 1,2,3,4. Here is the list with order status IDs and their descriptions:

PENDING – 1

PROCESSING – 2

FINISHED – 3

CANCELED – 4

Method errors and their descriptions:

1.    Invalid Currency Pair - one of the currencies is empty or contains invalid characters or currency pair is not available

2.    Invalid Currency Code - currency code is not present  in the list of available

3.    Invalid From: not a positive number – parameter from is not a positive number

4.    Invalid Count: not a positive number – parameter count is not a positive number

5.    Invalid From ID: not a positive number – parameter from_id is not a positive number

6.    Invalid End ID: not a positive number – parameter end_id is not a positive number

7.    Invalid Since: not a UNIX timestamp – parameter since is not a valid UNIX timestamp

8.    Invalid End: not a UNIX timestamp – parameter end is not a valid UNIX timestamp

9.    Invalid Status: not a positive number - parameter status is not a positive number Invalid Owner -  parameter owner is not equal to one of the available

Example:

$client->getTradeHistory()

Result:

{ "success":1, "data":{ "5303353":{ "pair":"BTC_NXT", "type":"buy", "amount":"0.3", "rate":"5352", "is_your_order":0, "timestamp":1464352943}, "5303346":{ "pair":"BTC_ETH", "type":"sell", "amount":"0.3", "rate":"5343", "is_your_order":1, "timestamp":1464352943 }}}

 

6. Trans History

Get information about your deposits and withdrawals. Return a list of:

1.      Deposit

1.1.   ID (deposit id in database)

1.2.   currency (deposit currency)

1.3.   amount (deposit amount)

1.4.   deposit fee (operational fee <>)

1.5.   TX_ID (deposit transaction id)

1.6.   status (current deposit status)

1.7.   date (operation time)

2.      Withdrawal

2.1.   ID (withdrawal id in database)

2.2.   currency (withdrawal currency)

2.3.   amount (withdrawal amount)

2.4.   withdrawal fee (operational fee <>)

2.5.   address (the address that will receive the payment)

2.6.   TX_ID (withdrawal transaction id)

2.7.   status (current withdrawal status)

2.8.   date (operation time)

endpoint: TransHistory

method: POST

params:

  • currency: string to select an entry deposit or withdrawal currency (optional, default: "ALL")
  • from: an integer value that represent number of records to be skipped before output (optional)
  • count: an integer value that represents the number of records that you want to display (optional, max: 50, default: 50)
  • from_id: an integer value which represent deposit or withdrawal id, from which the output begins (optional)
  • end_id: an integer value that represents deposit or withdrawal id after which the output ends (optional)
  • order: string to select the sort type (optional, default: "DESC")
  • since: UNIX timestamp that represents the time after which the output begins (optional)
  • end: UNIX timestamp that represents the time after which the output ends (optional)
  •  operation: string to select the operation type (optional, default: "ALL")
  • status: an integer value which represent deposit or withdrawal status (optional, default: "FINISHED")

 

The parameter currency can be "ALL", "BTC ", "NXT " or any other currency that available right now. You can see the list of all available currencies calling public method currencies

The parameter order can be one of "ASC" or "DESC". Please note that all orders are sorted by ID.

Note, if you use parameters since or end parameter order will be set to "ASC".

The parameter operation can be one of "ALL", "DEPOSIT" or "WITHDRAWAL".

The parameter status can be one of:

For deposit:

1.      FINISHED

2.      AWAITING_CONFIRMATIONS

For withdrawal:

1.      EMAIL_SENT

2.    CANCELED_BY_USER

3.    AWAITING_APPROVAL

4.   APPROVED

5.   PROCESSING

6.   WITHDRAWAL_ERROR

7.    CANCELED_BY_ADMIN

8.    FINISHED

If parameter operation is set to "ALL" parameter status will be set to " FINISHED".

 

Method errors and their descriptions:

1.    Invalid Currency Code - currency code is not present  in the list of available

2.    Invalid From: not a positive number – parameter from is not a positive number

3.    Invalid Count: not a positive number – parameter count is not a positive number

4.    Invalid From ID: not a positive number – parameter from_id is not a positive number

5.    Invalid End ID: not a positive number – parameter end_id is not a positive number

6.    Invalid Since: not a UNIX timestamp – parameter since is not a valid UNIX timestamp

7.    Invalid End: not a UNIX timestamp – parameter end is not a valid UNIX timestamp

 

Example:

$client->getTransHistory()

Result:

{"success":1, "data":{ "DEPOSIT":{ "113":{ "Currency":"NXT", "Amount":"11", "Deposit_fee":"2NXT", "TX_id":"17388534115659312996", "Status":"Finished", "Date":1461361743}, "112":{ "Currency":"NXT", "Amount":"10", "Deposit_fee":"2NXT", "TX_id":"4992090663590407388", "Status":"Finished", "Date":1461360604}}, "WITHDRAWAL":{ "15":{ "Currency":"NXT", "Amount":"12", "Withdrawal_Fee":"1NXT", "Address":"NXT-QLF8-K5L8-VPRE-CYVAX", "TX_id":"1748174097384839713", "Status":"FINISHED", "Date":1461363498}}}}

 

7. Grafic

Get information about trade statistic. Return an overview of:

1.    orders currency pair

2.    start date (period start date)

3.    end date (period end date)

4.    count of page for static info in this period

5.    current page

6.    count of points per page

7.    an array with static records named graf

·         the price of the first order in the current period

·         the price of the last order in the current period

·         the maximum price of the order in the current period

·         the minimum price of the order in the current period

 

endpoint: Grafic

method: POST

params:

  • pair: string to select an entry currency pairs (default: "ALL")
  • order: string to select the sort type (optional, default: "DESC")
  • since: UNIX timestamp that represents the time from which the output begins (optional, default: the beginning of the month)
  • end: UNIX timestamp that represents the time after which the output ends (optional, default: current time)
  •  page: an integer value that represent the current page (optional, default: 1)
  • count: an integer value that represents the number of records that you want to display per page (optional, max: 100, default: 50)
  • interval: string that represent time interval by which values are grouped (optional, default: "1D")

 

The parameter pair can be "BTC_NXT", "BTC_ETH" or any other pair that available right now. You can see the list of all available pairs calling public method markets

 The parameter order can be one of "ASC" or "DESC". Please note that all orders are sorted by ID.

Note, if you use parameters since or end parameter order will be set to "ASC".

 The parameter interval can be one of "1D", "1M" , "3M", "1Y".

Here is a description for each interval parameter values:

1D – day

1M – month

3M – 3 month

1Y – year

The parameter count can be one of "10", "25" , "50", "100".

Method errors and their descriptions:

1.    Invalid Currency Pair - one of the currencies is empty or contains invalid characters or currency pair is not available

2.    Invalid Currency Code - currency code is not present  in the list of available

3.    Selected Pair is disabled – operations for this pair are currently closed

4.    Invalid Since: not a UNIX timestamp – parameter since is not a valid UNIX timestamp

5.    Invalid End: not a UNIX timestamp – parameter end is not a valid UNIX timestamp

6.    Invalid Page: not a positive number – parameter page is not a positive number

7.    Invalid Count – parameter count is not present  in the list of available

 

Example:

$client->getGrafic("BTC_ETH")

Result:

{"success":1, "data":{ "pair":"BTC_ETH", "since":"2016-05-01 00:00:00", "end":"2016-07-01 00:01:15", "count_pages":3, "count":"2", "current_page":1, "graf":[{ "open":"5350.50000000", "close":"5358.70000000", "low":"5320.90000000", "high":"5361.00000000", "date":"2016-05-02 00:00:00"},{"open":"16.00000000", "close":"16.00000000", "low":"16.00000000", "high":"16.00000000", "date":"2016-05-03 00:00:00"}]}}

8. Deposit

Get information about your wallet to deposit funds. Return an overview of:

1.    currency (deposit currency code)

2.    address (wallet address)

3.    public key (wallet public key if exist)

3.    payment id (wallet payment id if exist)

 

endpoint: Deposit

method: POST

params:

  • currency: string to select an entry deposit currency

The parameter currency can be "BTC ", "NXT " or any other currency that available right now. You can see the list of all available currencies calling public method currencies

 

Method errors and their descriptions:

1.    Invalid Currency Code - currency code is not present  in the list of available

2.    Selected currency is disabled - operations for this currency are currently closed

3.    No Wallet — can’t find any wallet by selected currency

4.    No Wallet Address — create wallet address for    selected currency

Example:

$client->getMakeDeposit("NXT")

Result:

{ "success":1, "data":{ "currency":"NXT", "address":"NXT-C59X-SZRV-V36P-62SW3", "publicKey":" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}}

9. Withdraw

Withdraw your funds. Return an overview of:

1.    msg (operation comment)

2.    currency code (withdrawal currency code)

3.    amount (withdrawal amount)

4.    withdrawal fee (withdraw operation fee)

4.    withdrawal fee currency (withdrawal fee currency code)

5.    date (object that consist info about operation date)

6.    address (withdrawal address)

7.    Payment id (optional)

endpoint: Withdraw

method: POST

params:

  • currency: string to select an entry deposit currency
  •  address: string to select the withdrawal address
  • amount: a positive float value which represent the amount that you want to withdraw

 

The parameter currency can be "BTC ", "NXT " or any other currency that available right now. You can see the list of all available currencies calling public method currencies

 

Method errors and their descriptions:

1.    Invalid Currency Code - currency code is not present  in the list of available

2.    Selected currency is disabled - operations for this currency are currently closed

3.    Withdrawal is disabled –  user can not witdraw

4.    You can not withdraw money until <>  – You cann't withdraw money until min period is not pass

5.    The address field is required. – parameter address is required

6.    The amount field is required. – parameter amount is required

7.    The amount must be a number. – parameter amount is not a positive number

8.    "Address": The attribute must contain only letters and numbers

9.    You do not have enough <> – no enough funds on your balance

10.  Minimum withdrawal amount is <> <>  –  amount rezer than Minimum withdrawal amount

11.  Wrong address –  wrong address format  for NXT and Asset withdraw

12.  You do not have enough <>  on your <> balance to pay withdrawals fee – for asset withdraw you must have some funds on your balance to pay withdraw fee

Example:

$client->getMakeWithdraw("NXT", "NXT-C59X-SZRV-V36P-62SW3", 5)

Result:

{ "success":1, "data":{ "code":"NXT", "id":17, "amount":"9", "address":"NXT-C59X-SZRV-V36P-62SW3", "withdrawal_fee":"1", "withdrawal_fee_currency":"NXT", "token":"jTJDhfAok4AbEW0rdLKqMDagKsOOLRe1yTlQsUqLoXIgDyiwEimbWXiJ7", "date":{ "date":"2016-07-06 14:06:21.000000", "timezone_type":3, "timezone":"UTC"}, "msg":" Message with confirmation sent to your email address"}}

10. Generate Wallets

Generate currency wallet address. Return an overview of:

1.    msg (operation comment)

2.    code (currency code)

3.    address (created address)

4.    public key (if need)

5. Payment id (if need)

endpoint: GenerateWallets

method: POST

params:

·         currency: string to select an entry wallet currency

 

The parameter currency can be "BTC ", "NXT " or any other currency that available right now. You can see the list of all available currencies calling public method currencies

 

Method errors and their descriptions:

1.    Invalid Currency Code - currency code is not present  in the list of available

2.    Selected Currency is disabled - operations for this currency are currently closed

3.    Already have an wallet address - you already have an wallet address, so you need to use it before creating a new one

4.    Creation address for <> failed – an error when create a wallet address

Example:

$client->getGenerateWallets()

Result:

{"success":1, "data":{ "msg":"Address generated", "code":"BTC", "address":"1GgcGVRfxY8C5WXAkzt1qxKTi66HKzgyRL"}}

11. Ticket

Create ticket. Return an overview of:

1. msg (operation comment)

2. ticket id (ticket id in database)

3. subject

4. ticket category id (category id for tickets in database)

5. ticket status id (status id for tickets in database)

6. ticket message (text message of ticket)

endpoint: Ticket

method: POST

params:

  • category: an integer value which represent ticket_category_id
  • subject: string (only English letters)
  • message: string (only English letters)
  • currency_name: string (optional)

The parameter category can be one of:

1. Order Problem

2. Deposit Problem

3. Withdrawal Problem

4. Dividend Problem

5. Other

The value of status can be one of:

1. Awaiting Support Response

2. Awaiting Customer Response

3. Closed

Method errors and their descriptions:

1. The ticket category id field is required – parameter category is required

2. The subject field is required - parameter subject is required

3. The message field is required - parameter message is required

Example:

$client->setTicket()

Result:

{ "success":1, "data":{ "msg":"Ticket created", "ticket_id":"3", "subject":"Cann’t get deposit", "ticket_category_id":"2", "ticket_status_id":"1", "message":"Cann’t get deposit to my ETH wallet"}}

12. Get Tickets

Get tickets. Return an overview of:

1. ticket id (ticket id in database)

2. ticket category id (category id for tickets in database)

3. ticket status id (status id for tickets in database)

4. ticket message

4.1. text (text message of ticket)

4.2. date (date of created messages)

endpoint: GetTickets

method: POST

params:

  • ticket id: an integer value which represent ticket_id
  • category: an integer value which represent ticket_category_id
  • status: an integer value which represent ticket_status_id

All parameters can be empty.

The parameter category can be one of:

1. Order Problem

2. Deposit Problem

3. Withdrawal Problem

4. Dividend Problem

5. Other

The parameter of status can be one of:

1. Awaiting Support Response

2. Awaiting Customer Response

3. Closed

Method errors and their descriptions:

1. Invalid Ticket id – parameter ticket is not a positive number

Example:

$client->getTickets()

Result:

{"success":1, "data":{ "3":{ "ticket_id":3, "ticket_category_id":2, "ticket_status_id":1, "ticket_messages":{ "4":{"text":"Cann't get deposit to my ETH wallet", "date":{"date":"2017-03-14 10:04:32.000000","timezone_type":3,"timezone":"UTC"}}}}, "2":{ "ticket_id":2, "ticket_category_id":5, "ticket_status_id":1, "ticket_messages":{ "3":{"text":"pizza", "date":{"date":"2017-03-14 08:59:35.000000","timezone_type":3,"timezone":"UTC"}}}}}

13. Reply Ticket

Reply ticket. Return an overview of:

1. msg (operation comment)

2. ticket message id (ticket message id in database)

endpoint: ReplyTicket

method: POST

params:

  • ticket id: an integer value which represent ticket_id
  • message: string

Method errors and their descriptions:

1. Invalid Ticket id – parameter ticket is not a positive number

2. Ticket is closed – ticket with id have status closed

3. Ticket dosn’t exist – ticket with id does not exist

4. The message field is required - parameter message is required

Example:

$client->setReplyTicket()

Result:

{ "success":1, "data":{ "msg":"Ticket reply created", "ticket_massage_id":"6"}}

Did this answer your question?