2017-01-07 147 views
0

如何立即購買或出售poloniex api。我使用nickelbot 及其始終把訂單poloniex api立即出售/立即購買

function api_buy() 
{ 
    global $Adapters; 

    $exchange = isset($_GET['exchange']) ? $_GET['exchange'] : "error"; 
    if($exchange == "error") return array("error" => "exchange required"); 
    $price = isset($_GET['price']) ? $_GET['price'] : "error"; 
    if($price == "error") return array("error" => "price required"); 
    $amount = isset($_GET['amount']) ? $_GET['amount'] : "error"; 
    if($amount == "error") return array("error" => "amount required"); 
    $market = isset($_GET['market']) ? $_GET['market'] : "error"; 
    if($market == "error") return array("error" => "market required"); 

    //let's not open up the trade api to the public: 


    return array(get_class($Adapters[$exchange]) => $Adapters[$exchange]->buy($market, $amount, $price)); 
} 

回答

0

你說的immediatelly是什麼意思?

Websocket沒有實現發送買賣訂單,所以你必須使用API​​請求。

您可以使用

交易API方法: 買入和賣出(必填POST參數 「currencyPair」, 「速度」 和 「量」)

看看Poloniex API support