Code Monkey home page Code Monkey logo

exchanges-php's Issues

Exchange API里是不是缺少个key_secret.php?

我是初学,有个疑问。

我尝试在看exchange api,发现里面有文件引用key_secret.php。但是代码包里没有这个文件。请问是需要自己建立么?内容都写什么呢?

谢谢!

How to extend binance user class for example with sub-account api calls?

How do this work with Exchanges class?
have you a little code snip for request "GET /sapi/v1/sub-account/list (HMAC SHA256)" for me?

my code until now:

`use Lin\Exchange\Exchanges;

try {

$tmp_arr = array();
if (isset($cfg_main_arr['msa_api']['binance']['key_ro'])) {
    $tmp_arr = $cfg_main_arr['msa_api']['binance']['key_ro'];
}
if (empty($tmp_arr)) {
    die('config.json error: binance api key "key_ro" not exists!');
}

$ex_binance = new Exchanges('binance', $tmp_arr['APIKEY'], $tmp_arr['APISECRET']);

$result = $ex_binance->getPlatform('spot')
    ->user()
    ->getAccount();

print_r($result);

} catch (Exception $e) {
// error mail senden!!!
echo $e;
}`

okex V5 的 websocket 能出一个相关的使用示例吗?

两个小请求
1,目前okex websocket 只有 v3 的封装,如果可以能否封装一下v5的谢谢

2,目前用工厂获取的是 v3的实例,可以适配一下 v5 的
可以类似这样 $exchanges = new Exchanges('okexV5');
这个目前使用起来问题不大,我目前是这样使用的 new \Lin\Okex\OkexV5

主要是第一个,谢谢!

Adding exchanges

Hi, maybe you could add Poloniex exchange? Do you think about adding uniswap/pancakeswap?

发现几个小的细节问题

主要是下单的问题

RequestTraderMap.php

function buy()

> 115 $map['sz']=$data['_price'] ?? 0; => $map['sz']=$data['_number'] ?? 0;
> 118 switch ($this->platform){ => switch ($this->checkType($map['instId'])) {
> 129 if(!$data['_entry']) $map['side']='sell'; => if(!$data['_entry']) $map['posSide']='short';

Huobi Account ID

Hi! Thank you for the great work. When trying to post a sample trade with Huobi I get an error. I first get the Account ID using the $result=$huobi->account()->get(); method. I set this ID in the key_secret.php and then require the key_secret.php in my script.

use Lin\Exchange\Exchanges;
require 'exchanges/vendor/linwj/exchanges/tests/key_secret.php';

$key=$keysecret['huobi']['key'];
$secret=$keysecret['huobi']['secret'];
$host=$keysecret['huobi']['host'];
$account_id=$keysecret['huobi']['account_id'];

$exchanges=new Exchanges('huobi',$key,$secret,$account_id,$host);

I then get the following error:

"Array ( [_error] => Array ( [status] => error [err-code] => account-frozen-account-inexistent-error [err-msg] => account for id 1#,###,##6 and user id 1#,###,#9 does not exist [data] => [_method] => POST [_url] => https://api.huobi.pro/v1/order/orders/place [_httpcode] => 200 ) ) "

  1. For some reason it uses commas in the error code. My ID is an int without commas.
  2. what is user ID? I do not set this anywhere. All I have set is key, secret and ID.

Thank you for the help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.