Now go ahead and study some more examples, download the thing and provide feedback. (accountInfo.toString()) Īll exchange implementations expose the same API, but you can also directly access the underlying "raw" data from the individual exchanges if you need to. ExchangeSpecification exSpec = new BitstampExchange().getDefaultExchangeSpecification() ĮtApiKey("a4SDmpl9s6xWJS5fkKRT6yn41vXuY0AM") ĮtSecretKey("sisJixU6Xd0d1yr6w02EHCb9UwYzTNuj") Įxchange bitstamp = (exSpec) ĪccountService accountService = bitstamp.getAccountService() ĪccountInfo accountInfo = accountService.getAccountInfo() For more examples of adding the keys to theĮxchangeSpecification including storing them in a configuration file, see Frequently Asked Questions. To use the private API services, AccountService and TradeService, create an ExchangeSpecification with a unique API key and secret key (in someĬases more info is required), which you obtain through the exchange's web interface. Ticker ticker = marketDataService.getTicker(CurrencyPair.BTC_USD) MarketDataService marketDataService = bitstamp.getMarketDataService() Example 1: Public Market Data Exchange bitstamp = (()) Usage is very simple: Create an Exchange instance, get the appropriate service, and request data. XChange is a library providing a simple and consistent API for interacting with a diverse set of crypto currency exchanges, including support for Bitcoin.Ī complete list of implemented exchanges, data providers and brokers can be found on our Exchange Support page. To report bugs and see what issues people are currently working on see the issues page. See below for more details about building with Maven. For the latest bugfixes and features you should use the () or build yourself from the DEVELOP branch. The world of Bitcoin changes quickly and XChange is no exception. XChange is a Java library providing a simple and consistent API for interacting with 60+ Bitcoin and other crypto currency exchanges providing aĬonsistent interface for trading and accessing market data.
0 Comments
Leave a Reply. |