Skip to content

Commit 367676f

Browse files
authored
Merge pull request #2 from Punksolid/fix-order-optional-deprecation8.2
Bitso refactor better separation of concerns
2 parents fa41f1f + 28eeb11 commit 367676f

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

BitsoAPI/Bitso.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function account_status(): array
133133
$JSONPayload = '';
134134
$type = 'PRIVATE';
135135

136-
return Client::getData($path, $RequestPath, $HTTPMethod, $JSONPayload, $this);
136+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, $JSONPayload);
137137
}
138138

139139

@@ -176,7 +176,7 @@ public function fees(): array
176176
$HTTPMethod = 'GET';
177177
$JSONPayload = '';
178178

179-
return Client::getData($path, $RequestPath, $HTTPMethod, $JSONPayload, $this);
179+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, $JSONPayload);
180180
}
181181

182182

@@ -208,7 +208,7 @@ public function withdrawals(
208208
$RequestPath = '/api/v3/withdrawals/?'.$parameters;
209209
$HTTPMethod = 'GET';
210210

211-
return Client::getData($path, $RequestPath, $HTTPMethod, '', $this);
211+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, '');
212212
}
213213

214214
public function fundings($params = []): array
@@ -244,7 +244,7 @@ public function fundings($params = []): array
244244
$JSONPayload = '';
245245
$type = 'PRIVATE';
246246

247-
return Client::getData($path, $RequestPath, $HTTPMethod, $JSONPayload, $this);
247+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, $JSONPayload);
248248
}
249249

250250
public function user_trades($params = [], $ids = []): array
@@ -275,7 +275,7 @@ public function user_trades($params = [], $ids = []): array
275275
$JSONPayload = '';
276276
$type = 'PRIVATE';
277277

278-
return Client::getData($path, $RequestPath, $HTTPMethod, $JSONPayload, $this);
278+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, $JSONPayload);
279279
}
280280

281281
public function open_orders($params): array
@@ -297,7 +297,7 @@ public function open_orders($params): array
297297
$JSONPayload = '';
298298
$type = 'PRIVATE';
299299

300-
return Client::getData($path, $RequestPath, $HTTPMethod, $JSONPayload, $this);
300+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, $JSONPayload);
301301
}
302302

303303
public function lookup_order($ids)
@@ -319,7 +319,7 @@ public function lookup_order($ids)
319319
$JSONPayload = '';
320320
$type = 'PRIVATE';
321321

322-
return Client::getData($path, $RequestPath, $HTTPMethod, $JSONPayload, $this);
322+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, $JSONPayload);
323323
}
324324

325325
public function cancel_order($ids): array
@@ -336,7 +336,7 @@ public function cancel_order($ids): array
336336
$HTTPMethod = 'DELETE';
337337
$JSONPayload = '';
338338

339-
return Client::getData($path, $RequestPath, $HTTPMethod, $JSONPayload, $this);
339+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, $JSONPayload);
340340
}
341341

342342
public function place_order($params): array
@@ -346,7 +346,7 @@ public function place_order($params): array
346346
$HTTPMethod = 'POST';
347347
$JSONPayload = json_encode($params, JSON_THROW_ON_ERROR);
348348

349-
return Client::getData($path, $RequestPath, $HTTPMethod, $JSONPayload, $this);
349+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, $JSONPayload);
350350
}
351351

352352
public function fundingDestination($params): array
@@ -368,7 +368,7 @@ public function fundingDestination($params): array
368368
$JSONPayload = '';
369369
$type = 'PRIVATE';
370370

371-
return Client::getData($path, $RequestPath, $HTTPMethod, $JSONPayload, $this);
371+
return Client::getData($this, $path, $RequestPath, $HTTPMethod, $JSONPayload);
372372
}
373373

374374
public function setCredentials($key, $secret): static

BitsoAPI/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static function checkAndDecode($result)
7676

7777

7878
// All the other API methods...
79-
public static function getData($path, $RequestPath, $HTTPMethod, $JSONPayload = '', Bitso $instance): array
79+
public static function getData(Bitso $instance, $path, $RequestPath, $HTTPMethod, $JSONPayload = ''): array
8080
{
8181
$nonce = self::makeNonce();
8282
$message = $nonce . $HTTPMethod . $RequestPath . $JSONPayload;

0 commit comments

Comments
 (0)