-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.php
35 lines (26 loc) · 1.02 KB
/
example.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
require_once("btcturkpro.class.php");
// API anahtarını https://pro.btcturk.com/hesap-ayarlari/api adresinden alabilirsiniz
// You can get your api key at https://pro.btcturk.com/hesap-ayarlari/api
$apiKey = "BTCTURKPRO_API_PUBLIC_KEY";
$apiSecret = "BTCTURKPRO_API_SECRET";
$request = new BtcTurkPRO ($apiKey, $apiSecret);
// Bakiyeleri listeleme
// get balances
print_r( $request->getBalances() );
// Gerçekleşen Emirleri listeleme
// list successful trades
print_r( $request->getTrades("BTC_TRY", 50) );
// Açık Emirleri Listeleme
// List open orders
print_r ( $request->getOpenorders("BTC_TRY") );
// 40.000TL fiyat ile 0.001 BTC'lik LIMIT Emir
// Limit order
print_r ( $request->placeOrder("BTC_TRY", "limit", "buy", "40000", "0.001", "0") );
// 40.000TL fiyat, 39.800TL tetik fiyatı ile 0.001 BTC'lik LIMIT Emir
// Limir order with stop price
print_r ( $request->placeOrder("BTC_TRY", "limit", "buy", "40000", "0.001", "39800") );
// Emir iptali
// Cancel order
print_r ( $request->CancelOrder(1234567890) );
?>