Overview

Namespaces

  • Sotr
    • Crypto
      • Bitstamp
      • Btce

Classes

  • Sotr\Crypto\AbstractApi
  • Sotr\Crypto\AbstractRequestSigner
  • Sotr\Crypto\AccountBalance
  • Sotr\Crypto\Bitstamp\BitstampApi
  • Sotr\Crypto\Bitstamp\BitstampRequestSigner
  • Sotr\Crypto\Btce\BtceApi
  • Sotr\Crypto\Btce\BtceCurrencyPairResolver
  • Sotr\Crypto\Btce\BtceRequestSigner
  • Sotr\Crypto\CurrencyPair
  • Sotr\Crypto\Ticker
  • Sotr\Crypto\TimestampNonceGenerator

Interfaces

  • Sotr\Crypto\CurrencyPairResolverInterface
  • Sotr\Crypto\ExchangeApiInterface
  • Sotr\Crypto\NonceGeneratorInterface
  • Sotr\Crypto\RequestSignerInterface
  • Overview
  • Namespace
  • Class
 1: <?php
 2: namespace Sotr\Crypto;
 3: 
 4: use GuzzleHttp\Client;
 5: use GuzzleHttp\ClientInterface;
 6: 
 7: use Sotr\Crypto\CurrencyPair;
 8: 
 9: abstract class AbstractApi implements ExchangeApiInterface
10: {
11:     /**
12:      * The Guzzle client.
13:      *
14:      * @var GuzzleHttp\Client
15:      */
16:     protected $client;
17: 
18:     /**
19:      * The currency pair resolver.
20:      *
21:      * @var Sotr\Crypto\CurrencyPairResolverInterface
22:      */
23:     protected $resolver = null;
24: 
25:     /**
26:      * The customer's API key.
27:      *
28:      * @var string
29:      */
30:     protected $key;
31: 
32:     /**
33:      * The customer's API secret.
34:      *
35:      * @var string
36:      */
37:     protected $secret;
38: 
39:     public function __construct($key = null, $secret = null)
40:     {
41:         $this->key = $key;
42:         $this->secret = $secret;
43:         $this->setClient(new Client());
44:     }
45: 
46:     abstract public function getPublicBaseUri();
47: 
48:     abstract public function getTradingBaseUri();
49: 
50:     abstract public function getTicker(CurrencyPair $pair = null);
51: 
52:     abstract public function getBalance();
53: 
54:     public function setClient(ClientInterface $client)
55:     {
56:         $this->client = $client;
57:     }
58: 
59:     public function setCurrencyPairResolver(CurrencyPairResolverInterface $resolver)
60:     {
61:         $this->resolver = $resolver;
62:     }
63: 
64:     // protected function doRequest($url, $queryParams, $body, $headers)
65:     // {
66: 
67:     // }
68: }
69: 
API documentation generated by ApiGen