Skip to content

pop9990/yobit-php-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

yobit-php-wraper

Php api wrapper for YoBit.net criptocurency exchange

This project is designed to help you make your own projects in php that interact with the YoBit API. This project include v3 public api and trade api.Every response is in array form.

Getting started:

require 'api.php';
$api = new API($apiKey,$apiSecret);

Public api

From public endpoints you can stream :info,ticker,depth and trades.

Get info:

$info = $api->info();

Get ticker:

Function provides statistic data for the last 24 hours.

$ticker =$api->ticker($pair);

// exemples of pair "ltc_btc"
// you can also send multiple pairs separate with "-". For exemple "ltc_btc-eth_btc"

Depth

Function returns information about lists of active orders for selected pairs.

$depth = $api->depth($pair);

Trades

Function returns information about lists of active orders for selected pairs.

$trades = $api->trades($pair);

Trade api

getInfo

Function returns information about user's balances and priviledges of API-key as well as server time.

$getInfo = $api->getInfo($pairs);

Balance

Get total balances, including reserved in orders.

$balances = $api->balance();

Avilable balance

$avilableBalances =$api->avilableBalance();

Trade

Buy

$buy=$api->buy($pair, $amount, $rate);

Sell

$sell = $api->sell($pair, $amount, $rate);

Open orders

Function returns list of user's active orders.

$openOrders = $api->openOrders($pair);

OrderInfo

Informations apout order

$orderInfo =$api->orderInfo($order_id);

CancelOrder

Cancells the chosen order

$cancel = $api->cancelOrder($order_id);

TradeHistory

Returns transaction history.

$tradeHistory =$api->tradeHistory($pair);

GetDepositAddress

Returns deposit address.

$getDepositAdress = $api->getDepositAddress($coin);

If you need new adress second element is number 1

$getDepositAdress = $api->getDepositAddress($coin,1);

WithdrawCoinsToAddress

Creates withdrawal request.

$withdrawal = $api->withdraw($coin, $amount, $adress);

That is all.I hope I was helpful:)

BTC: 17HV8gPV9atBi5KjFCe6r2NDtwqLHaq2Ji
LTC: LXPTJW8eJMHQVzwnJbY7ukfQ6sM6pJpJe1
ETH: 0x0921eeed3f8dbf8da2e587e8c648a6f546c4ffe4

.

About

YoBit.net api - php wrapper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages