API




PUBLIC DATA


MARKETS

Lists all markets


GET https://www.southxchange.com/api/markets
See example

Field Description
Array of [Market entry]
[Market entry] (Array)
Index 0 Listing currency code
Index 1 Reference currency code
PRICE

Gets price of a given market


GET https://www.southxchange.com/api/price/{listingCurrencyCode}/{referenceCurrencyCode}
See example

Field Description
BidHighest buy order
AskLowest sell order
LastLast price
Variation24HrLast 24 hours last price variation
Volume24HrLast 24 hours volume
PRICES

Lists prices of all markets


GET https://www.southxchange.com/api/prices
See example

Field Description
Array of [Price entry]
[Price entry]
MarketMarket name
BidHighest buy order
AskLowest sell order
LastLast price
Variation24HrLast 24 hours last price variation
Volume24HrLast 24 hours volume
BOOK

Lists order book of a given market


GET https://www.southxchange.com/api/book/{listingCurrencyCode}/{referenceCurrencyCode}
See example

Field Description
BuyOrders Buy orders. Array of [Order entry]
SellOrders Sell orders. Array of [Order entry]
[Order entry]
Index Incremental value for each book entry
Amount Book entry total amount
Price Book entry price
TRADES

Lists latest trades in a given market


GET https://www.southxchange.com/api/trades/{listingCurrencyCode}/{referenceCurrencyCode}
See example

Field Description
Array of [Trade entry]
[Trade entry]
At Execution time in Unix standard format (UTC)
Amount Amount in listing currency
Price Price in reference currency
Type Possible values: buy, sell



PRIVATE DATA


Rules to use the private API

  • You need to generate a pair of API key and secret in your account settings.
  • All methods are sent as POST.
  • Parameters are sent in the request body as JSON, except for the Hash which is sent as an HTTP header named “Hash”.
  • There are two parameters that are always needed in the request body: nonce and key (API key). The documentation below will omit these parameters because they are always needed. Hash is also always needed but in the headers.
  • Nonce is a positive numerical value. You can use any number, but it must be greater than the last nonce you used in the previous request. To avoid keeping track of the nonce you can use a value that will always change, for example a timestamp in milliseconds or microseconds.
  • Methods will return HTTP 200 when successful, and HTTP 500 when an error occurred.
  • Hash is the HMAC-SHA512 of the request body (JSON) signed with the secret value. Make sure the encoding is UTF-8.


Parameters
Field Description
key API Key
nonce Positive numerical value greater than the one used in the previous call
Hash (HTTP header) HMAC-SHA512 of the request body signed with the secret value

PLACE ORDER

Places an order in a given market. Permission required: Place Order


POST https://www.southxchange.com/api/placeOrder
Parameters
Field Description
listingCurrency Market listing currency
referenceCurrency Market reference currency
type Order type. Possible values: buy, sell
amount Order amount in listing currency
limitPrice Optional price in reference currency. If null then order is executed at market price

Result
Order code
CANCEL ORDER

Cancels a given order. Permission required: Cancel Order


POST https://www.southxchange.com/api/cancelOrder
Parameters
Field Description
orderCode Order code to cancel
CANCEL MARKET ORDERS

Cancels all orders in a given market. Permission required: Cancel Order


POST https://www.southxchange.com/api/cancelMarketOrders
Parameters
Field Description
listingCurrency Market listing currency
referenceCurrency Market reference currency
LIST ORDERS

Lists all pending orders. Permission required: List Orders


POST https://www.southxchange.com/api/listOrders
Parameters
None

Result
Field Description
Array of [Order entry]
[Order entry]
Code Order code
Type Order type. Possible values: buy, sell
Amount Pending amount in listing currency
OriginalAmount Original amount in listing currency
LimitPrice Order price in reference currency
ListingCurrency Market listing currency
ReferenceCurrency Market reference currency
GENERATE NEW ADDRESS

Generates a new address for a given cryptocurrency. Permission required: Generate New Address


POST https://www.southxchange.com/api/generatenewaddress
Parameters
Field Description
currency Currency for which a new address will be generated

Result
Address
WITHDRAW

Withdraws to a given address. Permission required: Withdraw


POST https://www.southxchange.com/api/withdraw
Parameters
Field Description
currency Currency code to withdraw
address Destination address
amount Amount to withdraw. Destination address will receive this amount minus fees
LIST BALANCES

Lists balances for all currencies. Permission required: List Balances


POST https://www.southxchange.com/api/listBalances
Parameters
None

Result
Field Description
Array of [Balance entry]
[Balance entry]
Currency Currency code
Deposited Total amount deposited for this currency code
Available Total amount that is not committed in orders
Unconfirmed Total amount unconfirmed in pending deposits

SouthXchange