1. Currencies

Get all available currencies with additional info. Return an overview of:

1.    currency (currency code)

2.    active (active currency or not active)

3.    precision

4.    api precision

5.    minimum withdrawal amount

6.    minimum deposit amount

9.    deposit fee currency

10.    deposit fee const

11.    deposit fee percent

12.    withdrawal fee currency

13.    withdrawal fee const

14.    withdrawal fee percent

15.    currency long (currency long name)

base url: https://app.stocks.exchange/api2/currencies

method: GET

 

Example:

$client->getCurrencies()

       

Result:

[{ "currency":"BTC", "active":true, "precision":8, "api_precision":8, "minimum_withdrawal_amount":"0.01000000", "minimum_deposit_amount":"0.01000000", "calculated_balance":"0", "deposit_fee_currency":"BTC", "deposit_fee_const":0, "deposit_fee_percent":0,
"withdrawal_fee_currency":"BTC", "withdrawal_fee_const":0, "withdrawal_fee_percent":"0.50000000", "currency_long":"Bitcoin"},{ "currency":"NXT", "active":true, "precision":3, "api_precision":8, "minimum_withdrawal_amount":"5.00000000", "minimum_deposit_amount":"5.00000000", "calculated_balance":"10", "deposit_fee_currency":"NXT", "deposit_fee_const":"1.00000000", "deposit_fee_percent":0, "withdrawal_fee_currency":"NXT", "withdrawal_fee_const":"1.00000000", "withdrawal_fee_percent":0, "currency_long":"Next"}]

2. Markets

Get all available currency pairs with additional info. Return an overview of:

1.    currency (currency code)

2.    partner (partner currency code)

3.    currency long (currency long name)

4.    partner long (partner currency long name)

5.    min order amount (minimum order amount)

6.    min buy price (minimum buy price)

7.    min sell price (minimum sell price)

9.    buy fee percent (fee by percent for buying)

10.    sell fee percent (fee by percent for selling)

11.    active (active market or not active)

12.    currency precision

13.    partner precision (partner currency precision)

14.    market name

base url: https://app.stocks.exchange/api2/markets

method: GET

Example:

$client->getMarkets()

Result:

[{ "currency":"BTC", "partner":"USD", "currency_long":"Bitcoin", "partner_long":"USD", "min_order_amount":1.000000, "min_buy_price":0, "min_sell_price":0, "buy_fee_percent":0.002, "sell_fee_percent":0.002, "active":false, "currency_precision":8, "partne_precision":3, "market_name":"BTC_USD"},{ "currency":"BTC", "partner":"NXT", "currency_long":"Bitcoin", "partner_long":"Next", "min_order_amount":1.000000, "min_buy_price":0, "min_sell_price":0, "buy_fee_percent":0.002, "sell_fee_percent":0.002, "active":true, "currency_precision":8, "partne_precision":8, "market_name":"BTC_NXT"}}]

 

3. Market summary

Get currency pair with additional info. Return an overview of:

1.    currency (currency code)

2.    partner (partner currency code)

3.    currency long (currency long name)

4.    partner long (partner currency long name)

5.    min order amount (minimum order amount)

6.    min buy price (minimum buy price)

7.    min sell price (minimum sell price)

9.    buy fee percent (fee by percent for buying)

10.    sell fee percent (fee by percent for selling)

11.    active (active market or not active)

12.    currency precision

13.    partner precision (partner currency precision)

14.    market name

base url: https://app.stocks.exchange/api2/market_summary/{currency1}/{currency2}

method: GET

  • currency1: string to select first currency
  • currency2: string to select second currency

The parameters currency1 and currency2  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.    Invalid Currency Pair – currency pair is not present  in the list of available

Example:

$client->getMarketSummary()

Result:

[{ "currency":"BTC", "partner":"USD", "currency_long":"Bitcoin", "partner_long":"USD", "min_order_amount":1.000000, "min_buy_price":0, "min_sell_price":0, "buy_fee_percent":0.002, "sell_fee_percent":0.002, "active":false, "currency_precision":8, "partne_precision":3, "market_name":"BTC_USD"}]

4. Ticker

Use it to get the recommended retail exchange rates for all currency pairs. Return an overview of:

1.    min order amount

2.    ask (highest buy)

3.    bid (lowest sell)

4.    last

5.    last day ago

6.    volume 24 h

7.    spread 

8.    buy fee percent (fee by percent for buying)

9.    sell fee percent (fee by percent for selling)

10.    market name

11.    updated time

12.    server time

base url: https://stocks.exchange/api2/ticker

method: GET

Example:

$client->getTicker()

Result:

[{ "min_order_amount":"0.00000000", "ask":0, "bid":0, "last":"10.00000000", "lastDayAgo":1, "vol":15, "spread":-0.02, "buy_fee_percent":"0", "sell_fee_percent":"0", "market_name":"BTC_ETH", "updated_time":1470865580, "Server_time":1470865580}}]

5. Prices

Use it to get the new retail exchange rates for all currency pairs. Return an overview of:

1.    buy (highest buy)

2.    sell (lowest sell)

3.    market name

4.    updated time

5.    server time

base url: https://app.stocks.exchange/api2/prices

method: GET

Example:

$client->getPrices()

Result:

[{ "buy":"0.00003000", "sell":"0.00400000", "market_name":"BTC_ETH", "updated_time":1470865580, "Server_time":1470865580}}]

6. Trade History

Used to retrieve the latest trades that have occurred for a specific market. 

Need field:

  1. Pair – 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

Example:

$client->getTradeHistoryPublic()

Return an overview of:

{
  "success": 1,
  "result": [
    {
      "id": 1234,
      "timestamp": 1523479914,
      "quantity": "2.85310747",
      "price": "0.00003251",
      "type": "SELL"
    },
    {
      "id": 1234,
      "timestamp": 1523469243,
      "quantity": "2.85882512",
      "price": "0.00003989",
      "type": "BUY"
    },
    {
      "id": 1234,
      "timestamp": 1523458927,
      "quantity": "0.61280000",
      "price": "0.00003250",
      "type": "SELL"
    }
  ]
}

base url: https://app.stocks.exchange/api2/trades?pair=STEX_BTC

method: GET

7. Orderbook

Used to get retrieve the orderbook for a given market.

Need field:

  1. Pair – 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

Example:

$client->getOrderBook()

Response:

{
  "success": 1,
  "result": {
    "buy": [
      {
        "Quantity": "0.00189631",
        "Rate": "58.27632628"
      },
      {
        "Quantity": "0.00325300",
        "Rate": "100.00000000"
      }
    ],
    "sell": [
      {
        "Quantity": "0.00011358",
        "Rate": "2.84740126"
      },
      {
        "Quantity": "0.00001995",
        "Rate": "0.50000000"
      }
    ]
  }
}

base url: https://app.stocks.exchange/api2/orderbook?pair=STEX_BTC

method: GET

8. Grafic

Get information about trade statistic. Return an overview of:

Need field:

  1. Pair – 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
  2. Order - String to select the sort type (optional, default: "DESC")
  3. Since - UNIX timestamp that represents the time from which the output begins (optional, default: the beginning of the month)
  4. End - UNIX timestamp that represents the time after which the output ends (optional, default: current time)
  5. Page - an integer value that represent the current page (optional, default: 1)
  6. Count - an integer value that represents the number of records that you want to display per page (optional, max: 100, default: 50)
  7. 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".

Example:

$client->getGraficPublic()

Response:

{
  "success": 1,
  "data": {
    "pair": "STEX_BTC",
    "interval": "1D",
    "order": "ASC",
    "since": "2018-04-11 12:30:00",
    "end": "2018-04-12 12:45:12",
    "count_pages": 1,
    "count": "100",
    "current_page": 1,
    "graf": [
      {
        "open": "0.00018027",
        "close": "0.00018027",
        "low": "0.00018027",
        "high": "0.00018027",
        "date": "2018-04-11 17:30:00"
      },
      {
        "open": "0.00021449",
        "close": "0.00021449",
        "low": "0.00021449",
        "high": "0.00021449",
        "date": "2018-04-11 21:00:00"
      },
      {
        "open": "0.00021000",
        "close": "0.00021000",
        "low": "0.00021000",
        "high": "0.00021000",
        "date": "2018-04-11 22:00:00"
      },
      {
        "open": "0.00021000",
        "close": "0.00021000",
        "low": "0.00021000",
        "high": "0.00021000",
        "date": "2018-04-11 22:30:00"
      },
      {
        "open": "0.00021000",
        "close": "0.00021000",
        "low": "0.00021000",
        "high": "0.00021000",
        "date": "2018-04-11 23:30:00"
      },
      {
        "open": "0.00021000",
        "close": "0.00021000",
        "low": "0.00020000",
        "high": "0.00021000",
        "date": "2018-04-12 00:30:00"
      },
      {
        "open": "0.00020000",
        "close": "0.00020000",
        "low": "0.00020000",
        "high": "0.00020000",
        "date": "2018-04-12 03:00:00"
      },
      {
        "open": "0.00018032",
        "close": "0.00018032",
        "low": "0.00018032",
        "high": "0.00018032",
        "date": "2018-04-12 05:00:00"
      },
      {
        "open": "0.00021498",
        "close": "0.00021498",
        "low": "0.00021498",
        "high": "0.00021498",
        "date": "2018-04-12 06:00:00"
      },
      {
        "open": "0.00021496",
        "close": "0.00021496",
        "low": "0.00021496",
        "high": "0.00021496",
        "date": "2018-04-12 07:00:00"
      },
      {
        "open": "0.00021000",
        "close": "0.00021000",
        "low": "0.00021000",
        "high": "0.00021000",
        "date": "2018-04-12 08:00:00"
      }
    ]
  }
}

base url: https://app.stocks.exchange/api2/grafic_public?pair=STEX_BTC&interval=1D&order=ASC&count=100

method: GET

Did this answer your question?