Portal (New!)

Connect your app. Easily buying and selling through our platform.

Portal is a new Satang Pro platform API where you can connect your application to us through your existing OAuth API and let your users and our users be connected. Your application user then could buy or sell through our exchange platform (now only buying cryptocurrency is supported) and get the crypto/fiat back to your application in seconds or up to minutes.

Please contact [email protected] with the title "API Request: Portal OAuth Connect" in case you're interested to provide your platform OAuth API. We will whitelist and let your user be connectable to our exchange platform.

In order for Portal and your application to correctly work together, you will need to provide your OAuth API:

GET https://your-oauth-api-url/get-deposit-address?access_token=cf60766c0a3f4929a44985b7a3eb536a
&coin=BTC
200 OK
Content-Type: application/json
{
"coin": "BTC",
"address": "32ovuktGjD8CQs4e6G2nCkEGGrKvXQQgtf",
"tag": null
}

We will use this API (access_token is your application OAuth access token, we will get this automatically after your user has logged in through your OAuth API, coin is an upper-cased standard cryptocurrency unit name) to get your user deposit address. If your path is not /get-deposit-address please provide us with the info in the contact above.

The returning JSON of the API should be obvious except for the tag field. This field is for the cryptocurrency with optional tag or memo, such as XRP or XLM. For example:

GET https://your-oauth-api-url/get-deposit-address?access_token=cf60766c0a3f4929a44985b7a3eb536a
&coin=XLM
200 OK
Content-Type: application/json
{
"coin": "XLM",
"address": "GDHISAMF43GJN3Q2F2WEOFASN4HHM5S435X4GQL62FBMZCY7IHWPEQ5X",
"tag": "100"
}

get
Estimated Price

https://api.satang.pro/api/estimated-price/?pair&amount&side
Get current estimated price of the pair provided that you want to execute the order with the amount parameter. If side is buy, then the amount refers to the amount of fiat currency you want to pay, if side is sell then the amount refers to the amount of cryptocurrency you want to sell.
Request
Response
Request
Query Parameters
side
required
string
"buy" or "sell", now only support "buy".
amount
required
string
Amount as described in the description. Could provide with up to 4 decimal places for cryptocurrency amount (such as "7.5245" or up to 2 decimal places for fiat currency amount (such as "200000.00").
pair
required
string
Pair name, now only support: "btc_thb", "eth_thb", and "usdt_thb".
Response
200: OK
The estimated price for the provided amount.
{
"price": "222239.50"
}

post
Create new Portal order

https://api.satang.pro/api/portal-orders/
Create a new Portal order. This order is an immediate-or-cancel order, meaning if it does not match immediately after execution, if will get cancelled. After the order is matched, the amount matched (minus standard trading and withdrawal fees) will be sent through your. If side is buy, then the amount refers to the amount of fiat currency you want to pay, if side is sell then the amount refers to the amount of cryptocurrency you want to sell.
Request
Response
Request
Headers
Authorization
required
string
Satang Pro Authorization. Your application will get this value automatically after your application OAuth is whitelisted and your user is logged in using your OAuth.
Body Parameters
extras
required
string
A CSRF-like token that will be sent to your application automatically after your user logged in through your OAuth API (in the `extras` field - please refer to our integration guide which will be sent from the contact above).
price
required
string
The price you want to execute for this order. You should get this value from /api/estimated-price/?pair&amount&side API above.
pair
required
string
Pair name, now only support: "btc_thb", "eth_thb", and "usdt_thb".
side
required
string
"buy" or "sell", now only support "buy".
amount
required
string
Amount as described in the description. Could provide with up to 4 decimal places for cryptocurrency amount (such as "7.5245" or up to 2 decimal places for fiat currency amount (such as "200000.00").
Response
201: Created
The order is created and matched successfully. The auto withdrawal feature may or may not kick in as described below.
// The withdrawal is queued/sent to your application user deposit address.
{
"value": "0.35", // amount matched.
"withdrawal_status": "success"
}
// OR we can't withdraw to your application user deposit address
// due to the amount matched may be below our minimum withdrawal amount.
{
"value": "0.00015", // amount matched.
"withdrawal_status": "error",
"withdrawal_error_code": "NOT_ENOUGH_FUNDS_TO_WITHDRAW",
"withdrawal_error_message": "not enough funds to withdraw"
}
401: Unauthorized