madmis / kuna-api Goto Github PK
View Code? Open in Web Editor NEWKuna.io REST API php client
License: MIT License
Kuna.io REST API php client
License: MIT License
<?php
require 'vendor/autoload.php'; // подгрузка пакетов
use madmis\KunaApi\KunaApi;
$api = new KunaApi(
'https://kuna.io',
'XXXXXXXXXXXXXXXXX',
'XXXXXXXXXXXXXXXXXX'
);
function dd($var){
echo '<pre>';
print_r( $var );
}
// ============================================> Public (4 methods)
// 1) Время на сервере биржи (https://kuna.io/api/v2/timestamp)
$timestamp = $api->shared()->timestamp();
echo '<br>';
// 2) Последние данные по рынку (пара) (https://kuna.io/api/v2/tickers/btcuah)
$tickers = $api->shared()->tickers('btcuah');
// 3) Биржевой стакан (https://kuna.io/api/v2/order_book?market=btcuah)
$birgaStakan = $api->shared()->orderBook('btcuah');
// 3.1) Биржевой стакан продаж (https://kuna.io/api/v2/order_book?market=btcuah)
$birgaStakanAsks = $api->shared()->asksOrderBook('btcuah');
// 3.2) Биржевой стакан покупок (https://kuna.io/api/v2/order_book?market=btcuah)
$birgaStakanBids = $api->shared()->bidsOrderBook('btcuah');
// 4) История торгов (https://kuna.io/api/v2/trades?market=btcuah)
$tradesHist = $api->shared()->tradesHistory('btcuah');
// ============================================> Private ( methods)
// 5) Информация о пользователе и активах (https://kuna.io/api/v2/members/me)
echo 'Timestamp == ' . $timestamp . '<br>';
$me = $api->signed()->me(); // does not work
dd($me);
I think it is about '000' in then end of tonce
Me model -> nested accounts
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.