Skip to content

Commit

Permalink
文档备注
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Nov 8, 2018
1 parent 7f3d05e commit d6ae880
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
### 初始化

订单类的初始化
建议优先用测试服务器

在线接口测试[https://www.bitmex.com/api/explorer/](https://www.bitmex.com/api/explorer/)

测试服务器[https://testnet.bitmex.com](https://testnet.bitmex.com)

正式服务器[https://www.bitmex.com](https://www.bitmex.com)


//行情数据初始化
```php
$order=new \Lin\Bitmex\Api\Order($key, $secret);
//$order->test();
//$host 可以不传入,默认正式服务器访问;
$order=new \Lin\Bitmex\Api\OrderBook($key, $secret,$host);
$rlt=$order->get();
print_r($rlt);
//功能多API请查看API
```

订单类的初始化
```php
//$host 可以不传入,默认正式服务器访问;
$order=new \Lin\Bitmex\Api\Order($key, $secret, $host);
//订单查询
$rlt=$order->get([
'symbol'=>'ADAZ18',
Expand All @@ -24,10 +41,11 @@ print_r($rlt);
//功能多API请查看API
```


用户类的初始化
```php
$user=new \Lin\Bitmex\Api\User($key, $secret);
//$user->test();
//$host 可以不传入,默认正式服务器访问;
$user=new \Lin\Bitmex\Api\User($key, $secret, $host);

//订单查询
$rlt=$user->get();
Expand All @@ -36,10 +54,4 @@ print_r($rlt);
//功能多API请查看API
```

测试服务器[https://testnet.bitmex.com](https://testnet.bitmex.com)

测试服务器需要用到该方法:$class->test();正式部署注释掉该方法。

正式服务器[https://www.bitmex.com](https://www.bitmex.com)


0 comments on commit d6ae880

Please sign in to comment.