| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function testSuccessEndpoint() |
||
| 14 | { |
||
| 15 | echo "\n //// --- //// \n"; |
||
| 16 | |||
| 17 | $bybit = (new BybitAPI())->setCredentials('https://api-testnet.bybit.com', 'fL02oi5qo8i2jDxlum', 'Ne1EE35XTprIWrId9vGEAc1ZYJTmodA4qFzZ'); |
||
| 18 | |||
| 19 | $response = $bybit->privateEndpoint(SetAutoAddMargin::class, (new SetAutoAddMarginRequest()) |
||
| 20 | ->setSymbol('BTCUSDT')->setSide(EnumSide::BUY)->setPositionIdx(0)->setAutoAddMargin(1) |
||
| 21 | )->execute(); |
||
| 22 | |||
| 23 | if ($response->getReturnCode() == 0) { |
||
| 24 | echo "SUCCESS ENDPOINT: " . get_class($this) . "\n"; |
||
| 25 | echo "MESSAGE: {$response->getReturnMessage()}\n"; |
||
| 26 | } else { |
||
| 27 | echo "API ERORR: " . get_class($this) . "\n"; |
||
| 28 | echo "CODE: {$response->getReturnCode()} \n"; |
||
| 29 | echo "MESSAGE: {$response->getReturnMessage()} \n"; |
||
| 30 | echo "EXTENDED:" . implode(";\n", $response->getExtendedInfo()) . "\n"; |
||
| 31 | } |
||
| 32 | |||
| 33 | $this->assertTrue(true); |
||
| 34 | } |
||
| 36 |