forked from zhouaini528/bitmex-php
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18e64f6
commit eb88f27
Showing
1 changed file
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,41 @@ | ||
### 初始化 | ||
|
||
一个查询订单的初始化 | ||
订单类的初始化 | ||
```php | ||
$order=new \Lin\Bitmex\Api\Order($key, $secret); | ||
$order->test(); | ||
|
||
//订单查询 | ||
$rlt=$order->get([ | ||
'symbol'=>'ADAZ18', | ||
]); | ||
|
||
print_r($a); | ||
|
||
//创建新订单 | ||
$data=[ | ||
'symbol'=>'ADAZ18', | ||
'price'=>'0.00001196', | ||
'orderQty'=>'10', | ||
'ordType'=>'Limit', | ||
]; | ||
$rlt=$order->post($data); | ||
|
||
//功能多API请查看API | ||
``` | ||
$order->test(); | ||
|
||
用户类的初始化 | ||
```php | ||
$user=new \Lin\Bitmex\Api\User($key, $secret); | ||
$user->test(); | ||
|
||
//订单查询 | ||
$rlt=$user->get(); | ||
print_r($rlt); | ||
|
||
//功能多API请查看API | ||
``` | ||
|
||
|
||
$class->test(); | ||
|
||
初始化该方法是请求测试服务器,正式部署注释掉该方法 |