1 | <?php |
||
8 | class Binance extends ExchangeAbstract |
||
9 | { |
||
10 | private $nonce = false; |
||
11 | |||
12 | /** @var API $client */ |
||
13 | protected $client; |
||
14 | |||
15 | public function __construct(Config $config) |
||
19 | |||
20 | /** |
||
21 | * @param $uri |
||
22 | * @param array $params |
||
23 | * @return mixed |
||
24 | * @throws \Exception |
||
25 | */ |
||
26 | public function send($uri, array $params = []) |
||
79 | |||
80 | /** |
||
81 | * |
||
82 | */ |
||
83 | public function setClient() |
||
87 | |||
88 | /** |
||
89 | * @param $btc |
||
90 | * @param $price |
||
91 | * @return mixed |
||
92 | * @throws \Exception |
||
93 | */ |
||
94 | public function buyOrder($btc, $price) |
||
103 | |||
104 | /** |
||
105 | * @param $btc |
||
106 | * @param $price |
||
107 | * @return mixed |
||
108 | * @throws \Exception |
||
109 | */ |
||
110 | public function sellOrder($btc, $price) |
||
119 | |||
120 | /** |
||
121 | * @return mixed |
||
122 | * @throws \Exception |
||
123 | */ |
||
124 | public function getInfo() |
||
128 | |||
129 | /** |
||
130 | * @return mixed |
||
131 | */ |
||
132 | public function getTicker() |
||
136 | |||
137 | |||
138 | /** |
||
139 | * @return array |
||
140 | */ |
||
141 | public function getOrderBook($pair = 'BTCUSD') |
||
147 | |||
148 | |||
149 | /** |
||
150 | * @return mixed |
||
151 | * @throws \Exception |
||
152 | */ |
||
153 | public function getOrders() |
||
159 | |||
160 | /** |
||
161 | * @return mixed |
||
162 | * @throws \Exception |
||
163 | */ |
||
164 | public function getTransactionHistory() |
||
168 | |||
169 | /** |
||
170 | * @return mixed |
||
171 | * @throws \Exception |
||
172 | */ |
||
173 | public function getTradeHistory() |
||
177 | |||
178 | |||
179 | /** |
||
180 | * @param $order_id |
||
181 | * @return mixed |
||
182 | * @throws \Exception |
||
183 | */ |
||
184 | public function cancelOrder($order_id) |
||
190 | |||
191 | |||
192 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.