-
Notifications
You must be signed in to change notification settings - Fork 1
/
Tester.php
66 lines (50 loc) · 1.35 KB
/
Tester.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
require_once('Bit2cClient.php');
//$client = new Bit2cClient("https://www.bit2c.co.il/","api-key","api-secret");
// UserBalance Example
/*$balance = $client->Balance();
print_r($balance);*/
// GetTrades Example
/*$trades = $client->GetTrades(PairType::BtcNis);
print_r($trades); */
// Get Ticker Example
/*$ticker = $client->GetTicker();
print_r($ticker);*/
/* Get Order Book Example
$orderBook = $client->GetOrderBook();
print_r($orderBook);*/
/* AddOrder Example
$orderData = new OrderData();
$orderData->Amount = 1.2342;
$orderData->Price = 3600;
$orderData->Total = $orderData->Amount * $orderData->Price;
$orderData->IsBid = true;
$orderData->Pair = PairType::BtcNis;
$orderRes = $client->AddOrder($orderData);
print_r($orderRes);
*/
/* Get My Orders Example */
/*$orders = $client->MyOrders();
print_r($orders);*/
/*Get Account History
$history = $client->AccountHistory();
print_r($history);
*/
/* Clear My Orders
$client->ClearMyOrders();
*/
/* Cancel Order
$client->CancelOrder(123456);
*/
/* Create Checkout Example
$data = new CheckoutLinkModel();
$data->Price = 6000;
$data->Description = 'my checkout';
$data->CoinType = CoinType::NIS;
$data->RetrunURL = '';
$data->CancelURL = '';
$data->NotifyByEmail = 'true';
$response = $client->CreateCheckout($data);
print_r($response);
*/
?>