| @@ 39-55 (lines=17) @@ | ||
| 36 | * @param float $rate |
|
| 37 | * @param bool $useAwards |
|
| 38 | */ |
|
| 39 | public function addBuyLimit(string $market, float $quantity, float $rate, bool $useAwards = false) |
|
| 40 | { |
|
| 41 | $addOrder = [ |
|
| 42 | "resource" => "order", |
|
| 43 | "operation" => "post", |
|
| 44 | 'payload' => [ |
|
| 45 | 'marketSymbol' => $market, |
|
| 46 | 'direction' => 'BUY', |
|
| 47 | 'type' => 'LIMIT', |
|
| 48 | 'quantity' => $quantity, |
|
| 49 | 'limit' => $rate, |
|
| 50 | 'timeInForce' => 'GOOD_TIL_CANCELLED', |
|
| 51 | 'useAwards' => $useAwards |
|
| 52 | ||
| 53 | ]]; |
|
| 54 | $this->batchQueue->push($addOrder); |
|
| 55 | } |
|
| 56 | ||
| 57 | /** https://bittrex.github.io/api/v3#operation--batch-post |
|
| 58 | * https://bittrex.github.io/api/v3#operation--orders-post |
|
| @@ 64-80 (lines=17) @@ | ||
| 61 | * @param float $rate |
|
| 62 | * @param bool $useAwards |
|
| 63 | */ |
|
| 64 | public function addSellLimit(string $market, float $quantity, float $rate, bool $useAwards = false) |
|
| 65 | { |
|
| 66 | $addOrder = [ |
|
| 67 | "resource" => "order", |
|
| 68 | "operation" => "post", |
|
| 69 | 'payload' => [ |
|
| 70 | 'marketSymbol' => $market, |
|
| 71 | 'direction' => 'SELL', |
|
| 72 | 'type' => 'LIMIT', |
|
| 73 | 'quantity' => $quantity, |
|
| 74 | 'limit' => $rate, |
|
| 75 | 'timeInForce' => 'GOOD_TIL_CANCELLED', |
|
| 76 | 'useAwards' => $useAwards |
|
| 77 | ||
| 78 | ]]; |
|
| 79 | $this->batchQueue->push($addOrder); |
|
| 80 | } |
|
| 81 | ||
| 82 | /** https://bittrex.github.io/api/v3#operation--batch-post |
|
| 83 | * https://bittrex.github.io/api/v3#operation--orders--orderId--delete |
|