This API allows to trade.

All requests to Trade API come from the following URL: https://coinsmarkets.com/apiv1.php

The method is POST.

All server responses are received in the JSON format.

Each request needs an authentication. As authentication you will need your username , password and pin.

In the case of successful request, the response will be of the following type:

{
	"success":1,
	"return":{<response>}
}

Response in the case of error:

{
	"success":0,
	"error":"<error>"
}

Gettradinginfo

Returns information about the users current balance.

Sample:

data=gettradinginfo.

Sample response:

{
	"success":1,
	"return":{
	 "open_orders":number of open trade,
         "server_time":server time ,
		"funds":{
			"doge":balnce,
			"btc":balnce,
			"ltc":balnce
                        ...

		},

	}
}

funds: Your account balance available for trading. Doesnt include funds on your open orders.

open_orders: The number of your open orders.

server_time: Server time .

Activetrade

Returns the list of your active orders.

Sample:

data=Activetrade[BTC_LTC]

Sample response:

{
	"success":1,
	"return":{
		"trade_id":{
			"pair":"btc_ltc",
			"type":"sell",
			"amount":trade amount,
			"rate":trade price,
			"timestamp_created":created time,
			"status":0
		},

	}
}
    

OrderInfo

Returns the information on particular order.

Sample:

data=OrderInfo[order_id]

Sample response:

{
	"success":1,
	"return":{
		"trade_id":{
			"pair":"btc_ltc",
			"type":"sell",
			"amount":trade amount,
			"rate":trade price,
			"timestamp_created":created time,
			"status":0
		},

	}
}
        

TradeHistory

Returns trade history for current pair.

Sample:

data=TradeHistory[pair]

Sample response:

{
	"success":1,
	"return":{
		"trade_id":{
			"pair":"btc_ltc",
			"type":"sell",
			"amount":trade amount,
			"rate":trade price,
			"timestamp_created":created time,
			"status":0
		},

	}
}


        

DepositLog

Returns deposit history for current coin.
Sample:
data=DepositLog[coin]
Sample response:
{
	"success":1,
	"return":{
		"transaction_id":{
			"coin":"btc",
			"type":"Generate/receive",
			"amount":amount,
			"txid":transaction txid,
                        "blockhash":blockhash,
			"timestamp":received time,
			"status":0
		},

	}
}

         

WithdrawlLog

Returns withdrawl history for current coin.
Sample:
data=withdrawlLog[coin]
Sample response:
{
	"success":1,
	"return":{
		"id":{
			"coin":"btc",
			"amount":amount,
			"to_address":wallet address,
			"timestamp":processing time,
			"status":0
		},

	}
}

    

Canceltrade

Cancel a trade.
Sample:
data=Canceltrade[trade_id]
Sample response:
{
	"success":1,
	"return":{
		"order_id":$pair ,
                   "funds":{
			"amount":amount,
			"price":buy/sale price,
			"timestamp":trade creation time,
			"status":0
		},

	}
}



        

Depositaddress

Get deposit address for a coin.
Sample:
data=Depositaddress[coin]
Sample response:
{
	"success":1,
	"return":{


			"coin":coin name such as BTC,
			"name":name of coin such as bitcoin,
			"address":your deposit address,
			"status":0


	}
}



    

Depositaddress

Get deposit address for a coin.
Sample:
data=Depositaddress[coin]
Sample response:
{
	"success":1,
	"return":{


			"coin":coin name such as BTC,
			"name":name of coin such as bitcoin,
			"address":your deposit address,
			"status":0


	}
}



Withdraw

Withdraw coins to your wallet.
Sample:
data=Withdraw[coin_amount_address]
Sample response:
{
	"success":1,
	"return":{


			"coin":coin name such as BTC,
			"amount":amount to withdraw,
			"address":ddress where your coin will be sent,
			"status":0


	}
}

Trade

Set a new Buy/Sale trade.
Sample:
data=Trade[btc_ltc_sale_price_amount]
Sample response:
{
	"success":1,
	"return":{


            "pair":"BTC_LTC",
            "type":sale or buy trade,
            "amount":"ammount to buy or sale",
            "price":"price",
            "status":0";


	}
}

PHP curl Samples :

This sample allow to get Activetrade BTC_LTC ;

$data = "username=username&password=password&pin=pin&data=Activetrade[BTC_LTC]";

// our curl handle (initialize if required)

$content_type=" application/json";

$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; coinsmarkets PHP client; '.php_uname('s').'; PHP/'.phpversion().')');

curl_setopt($ch,CURLOPT_HEADER, false);

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_URL, 'https://coinsmarkets.com/apiv1.php');

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

// run the query

$res = curl_exec($ch);

This sample allow to get your BTC address ;

$data = "username=username&password=password&pin=pin&data=depositaddress[BTC]";

// our curl handle (initialize if required)

$content_type=" application/json";

$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; coinsmarkets PHP client; '.php_uname('s').'; PHP/'.phpversion().')');

curl_setopt($ch,CURLOPT_HEADER, false);

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_URL, 'https://coinsmarkets.com/apiv1.php');

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

// run the query

$res = curl_exec($ch);

This sample allow to withdraw 1 btc to address 1uilGdtqhsmRHfvLGRKTntpjq445yNMyWB ;

$data = "username=username&password=password&pin=pin&data=withdraw[BTC_1_1uilGdtqhsmRHfvLGRKTntpjq445yNMyWB]";

// our curl handle (initialize if required)

$content_type=" application/json";

$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; coinsmarkets PHP client; '.php_uname('s').'; PHP/'.phpversion().')');

curl_setopt($ch,CURLOPT_HEADER, false);

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_URL, 'https://coinsmarkets.com/apiv1.php');

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

// run the query

$res = curl_exec($ch);

This sample allow to set a trade : 10 litecoin for a price of 1000 bitcoin per LTC ;

$data = "username=username&password=password&pin=pin&data=withdraw[BTC_LTC_buy_1000_10]";

// our curl handle (initialize if required)

$content_type=" application/json";

$ch = curl_init();

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; coinsmarkets PHP client; '.php_uname('s').'; PHP/'.phpversion().')');

curl_setopt($ch,CURLOPT_HEADER, false);

curl_setopt ($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_URL, 'https://coinsmarkets.com/apiv1.php');

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

// run the query

$res = curl_exec($ch);

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 





News

Giveaway of 20 BMXT

Time : 2017-08-18
All members with active trade @21-08-2017 will get a share of those coins . Join now and make your first active trade .

CoinQuest Removal

Time : 2017-08-13
After Dev request , we are delisting QWT from our exchange please withdraw all your coin ,

BTC wallet Online

Time : 2017-08-02
BTC wallet is working fine now .

BTC wallet disabled

Time : 2017-07-31
Bitcoin wallet is disabled until we see how the fork go .

SweepStake wallet crash

Time : 2017-07-29
Sweepstake wallet has crashed , we are syncing the wallet again , please bear with us while we are working on it .

New Wallet status

Time : 2017-07-27
We just introduced new wallet status page , it is available @ Wallet Status.

Newly Listed
NameTicker
Walletbuilderscoin WBC
Fraz Coin FRAZ
Gheez G
Rupaya RUP
Sojourn SOJ
CoinQwest QWT
Signatum SIGT
AdCoin ACC
OliTwistCoin OLIT
Bitmxittz BMXT

Our advantages:

Contacts:

email Support

Log json format :

Full trade log json format