GLOBALXCHANGE API v1

GLOBALXCHANGE API v1


The current stable version of the API is v1, the new v2 is in private beta.

Overview

The GLOBALXCHANGE API v1.0 is a basic REST API that users can use to retrieve market data. The API, for ease, is mostly compatible with similar simple APIs made by other major exchanges. API calls are limited to 10 requests per second, with any request exceeding the rate limit denied by an https 503 response. All API responses are valid JSON arrays.

API Functions

  1. Market Summary
  2. Market Stats
  3. Market Trades
  4. Market Orders
  5. Market Chart Data

Market Summary

GET https://api.globalxchange.world/v1/market/summary

Function: Provides an overview of all markets. Data Refresh: every minute.

GET https://api.globalxchange.world/v1/market/summary/{EXCHANGE}

Function: Provides an overview of either the BTC or LTC market. Data Refresh: every minute.

Example: https://api.globalxchange.world/v1/market/summary/BTC

JSON Response

[{
   "market_id":"25",
   "code":"AUR",
   "exchange":"BTC",
   "last_price":"0.04600001",
   "yesterday_price":"0.04300000",
   "change":"+6.98",
   "24hhigh":"0.04980000",
   "24hlow":"0.04000050",
   "24hvol":"21.737"
   "top_bid":"0.04590000"
   "top_ask":"0.04600005"
},
...
]
								

Market Stats

GET https://api.globalxchange.world/v1/market/stats/{COIN}/{EXCHANGE}

Function: Provides stats for a single specific market. Data Refresh: every minute.

Example: https://api.globalxchange.world/v1/market/stats/MONA/BTC

JSON Response

[{
   "market_id":"25",
   "code":"AUR",
   "exchange":"BTC",
   "last_price":"0.04600001",
   "yesterday_price":"0.04300000",
   "change":"+6.98",
   "24hhigh":"0.04980000",
   "24hlow":"0.04000050",
   "24hvol":"21.737"
   "top_bid":"0.04590000"
   "top_ask":"0.04600005"
}]
								

Market Trades

GET https://api.globalxchange.world/v1/market/trades/{COIN}/{EXCHANGE}

Function: Retrieves the last 100 trades for the specific market.

Example: https://api.globalxchange.world/v1/market/trades/MONA/BTC

JSON Response

[{
   "count":"100",
   "trades":[{
      "type":"1",
      "price":"0.00000023",
      "amount":"412128.80177019",
      "total":"0.09478962",
      "time":"1394498289.2727"
   },
   ...
}]
								

Please note that 0=Buy, 1=Sell.

Market Orders

GET https://api.globalxchange.world/v1/market/orders/{COIN}/{EXCHANGE}/{TYPE}

Function: Returns the best priced 50 orders for a given market.

Example: https://api.globalxchange.world/v1/market/orders/MONA/BTC/BUY

JSON Response

[{
   "count":"23",
   "type":"BUY",
   "orders":[{
      "price":"0.00000023",
      "amount":"22446985.14519785",
      "total":"5.16280655"
   },
   ...
}]
								

Market Chart Data

GET https://api.globalxchange.world/v1/market/chartdata/{MARKET_ID}/{PERIOD}

This returns chart data, which we also use for our candlestick graphs for any given period. As with similar APIs, the period is optional ('6hh' (6 hours), '1DD' (24 hours), '3DD' (3 days), '7DD' (1 week) or 'MAX'). Market ID is visible as the URL in the address bar when browsing a market on our web site.

Example: https://api.globalxchange.world/v1/market/chartdata/1/1DD

JSON Response

[{
   "date":"2014-02-09 14:20",
   "open":"0.00000006",
   "close":"0.00000006",
   "high":"0.00000006",
   "low":"0.00000003",
   "coin_volume":"608.50000000"
},
...
]