hitbtc-com / hitbtc-php-sdk Goto Github PK
View Code? Open in Web Editor NEWHitBTC SDK for PHP
HitBTC SDK for PHP
For creating order,
$response = $this->getHttpClient()->post('/api/1/trading/new_order', array(
'body' => $order->asArray(),
'exceptions' => false,
));
'body' parameter is deprecated on Guzzle 6+. So please update with 'form_params'.
Change PublicClient::getOderBook to PublicClient::getOrderBook
/api/1/trading/orders/active return seems to strip the decimal out of quantity in this example i have a sell order for 200 (in the gui it reads as 200.000).
SNC 0 reserved:200 total 200
getactiveOrders:
object(Hitbtc\Model\Order)#144 (10) {
["orderId":protected]=>
string(10) "asdf"
["clientOrderId":protected]=>
string(32) "asdf"
["orderStatus":protected]=>
string(3) "new"
["price":protected]=>
string(8) "0.000014"
["quantity":protected]=>
int(200000)
["type":protected]=>
string(5) "limit"
["timeInForce":protected]=>
string(3) "GTC"
["symbol":protected]=>
string(6) "SNCBTC"
["side":protected]=>
string(4) "sell"
["cumQuantity":protected]=>
int(0)
}
Use the current api-version (2.x)
Any files need to require where to call the classes?
I tried to require class files according to the error, then another class not found error occurs. So many classes could not be found, I don't think it's the right way to do like this. Can anyone tell me how to use?
I created a folder named Hitbtc under my project, after install the sdk through composer, therer are three items in the folder: vendor(directory), composer.json, composer.lock. Shall i change the default files position under the vendor directory?
my code used to be like this(don't know if i need to require files):
// require_once("Hitbtc/vendor/hitbtc-com/hitbtc-php-sdk/src/Hitbtc/PublicClient.php");
// require_once("Hitbtc/vendor/hitbtc-com/hitbtc-php-sdk/src/Hitbtc/ProtectedClient.php");
/require_once("Hitbtc/vendor/guzzlehttp/guzzle/src/Client.php");
require_once("Hitbtc/vendor/guzzlehttp/guzzle/src/functions.php");/
// require_once("Hitbtc/vendor/guzzlehttp/guzzle/src/ClientInterface.php");
// use GuzzleHttp\Client\PublicClient;
// use GuzzleHttp\ClientInterface;
$hitpub = new \Hitbtc\PublicClient($demo = false);
$hitsec = new \Hitbtc\ProtectedClient(HITBTC_KEY, HITBTC_SECRET, $demo = false); //
function getHitdepth($market,$coin,$limit){
global $hitpub;
$symbol=$coin.$market;
$depth=$hitpub->getOderBook($symbol,$limit); // i tried to modify some functions to fit in v2 version of api
return $depth;
}
Details of the withdrawal initiated
Address: 0x071dd94faae2151237a78c86048722129502c118
Transaction hash: 0xa8bdabed750257f0baa5fe525837ec6af4d4abafbe06167de1e5439b01f5db2d
Operation ID: 54625b4d-09d1-4349-b605-671497a6a0be
Date Created (UTC): 19/11/2017, 09:28:21
Date Updated (UTC): 19/11/2017, 09:56:14
Thanks
It's over 2 days and still not processed. The transaction hash is not there in the blockchain either. Please help me, team. Till now it has been a pleasant experience. Only withdrawal seems a bit slow.
I want to continue trying in hitbtc.
I will give strong positive reviews to hitbtc on quick assistance from the team.
Help would really be appreciated! :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.