Conditions | 2 |
Paths | 2 |
Total Lines | 25 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function testSuccessEndpoint() |
||
13 | { |
||
14 | $bybit = (new BybitAPI())->setCredentials('https://api-testnet.bybit.com', 'fL02oi5qo8i2jDxlum', 'Ne1EE35XTprIWrId9vGEAc1ZYJTmodA4qFzZ'); |
||
15 | |||
16 | $isSetAutoAddMargin = $bybit->privateEndpoint( |
||
17 | SetLeverage::class, |
||
18 | (new SetLeverageRequest()) |
||
19 | ->setSymbol('BTCUSDT') |
||
20 | ->setSellLeverage(5) |
||
21 | ->setBuyLeverage(5) |
||
22 | )->execute(); |
||
23 | |||
24 | if ($isSetAutoAddMargin->getReturnCode() == 0) { |
||
25 | echo "Success set leverage: {$isSetAutoAddMargin->getReturnMessage()}\n"; |
||
26 | } else { |
||
27 | echo "Not success set leverage: {$isSetAutoAddMargin->getReturnMessage()}\n"; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Success set leverage: OK |
||
32 | * ---- OR |
||
33 | * Not success set leverage: leverage not modified |
||
34 | */ |
||
35 | |||
36 | $this->assertTrue(true); |
||
37 | } |
||
39 |