| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Titan 名字就是密码
- * Date: 2019/12/31
- * Time: 17:08
- */
- namespace backend\models;
- /**
- * mt5管理
- * Class Mt5tradeApi
- * @package backend\models
- */
- class Mt5tradeApi extends BaseApi
- {
- public $apiurl = "mt5";
- /**
- * 持仓
- * @param $data
- * @return array
- */
- public function getPostionList($data)
- {
- $result = $this->post($this->apiurl."/position-list",$data);
- if($result['code'] == 1){
- return $this->returnArray(1,$result['data'],"OK");
- }else{
- return $this->returnArray(0,[],'FAILED');
- }
- }
- /**
- * 订单
- * @param $data
- * @return array
- */
- public function getOrderList($data)
- {
- $result = $this->post($this->apiurl."/order-list",$data);
- if($result['code'] == 1){
- return $this->returnArray(1,$result['data'],"OK");
- }else{
- return $this->returnArray(0,[],'FAILED');
- }
- }
- /**
- * 成交
- * @param $data
- * @return array
- */
- public function getDealList($data)
- {
- $result = $this->post($this->apiurl."/deal-list",$data);
- if($result['code'] == 1){
- return $this->returnArray(1,$result['data'],"OK");
- }else{
- return $this->returnArray(0,[],'FAILED');
- }
- }
- }
|