Herdr UI
Herdr의 TUI가 뛰어나며, 창을 통해 추가되는 기능
XChange는 60개 이상 비트코인·알트코인 거래소와 거래·시세 데이터를 일관된 API로 제공하는 Java 라이브러리
XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
개발 도구Java · JavaScriptGitHub @knowm온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗XChange is a Java library providing a simple and consistent API for interacting with 60+ Bitcoin and other cryptocurrency exchanges, providing a consistent interface for trading and accessing market data.
A big thanks to all the contributors who have helped make XChange what it is today! ❤️
The world of Bitcoin changes quickly and XChange is no exception. For the latest bugfixes and features you should use the snapshot jars or build yourself from the develop branch. See below for more details about building with Maven. To report bugs and see what issues people are currently working on see the issues page.
XChange is a Java based library providing a simple and consistent API for interacting with a diverse set of cryptocurrency exchanges.
Basic usage is very simple: Create an Exchange instance, get the appropriate service, and request data. More complex usages are progressively detailed below.
| Exchange | Status |
|---|---|
| bitfinex | |
| bitget | |
| deribit | |
| gate.io | |
| kraken | |
| stream-bitfinex | |
| stream-deribit | |
| stream-kraken-v2 |
To use public APIs which do not require authentication:
Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(BitstampExchange.class);
MarketDataService marketDataService = bitstamp.getMarketDataService();
Ticker ticker = marketDataService.getTicker(CurrencyPair.BTC_USD);
System.out.println(ticker.toString());
To use APIs which require authentication, create an ExchangeSpecification with your API credentials and pass this to createExchange():
ExchangeSpecification exSpec = new BitstampExchange().getDefaultExchangeSpecification();
exSpec.setUserName("34387");
exSpec.setApiKey("a4SDmpl9s6xWJS5fkKRT6yn41vXuY0AM");
exSpec.setSecretKey("sisJixU6Xd0d1yr6w02EHCb9UwYzTNuj");
Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(exSpec);
Please Note: while most exchanges use just an API key and secret key, others (such as username on Bitstamp or passphrase on Coinbase Pro) are exchange-specific. For more examples of adding the keys to the ExchangeSpecification, including storing them in a configuration file, see Frequently Asked Questions.
Once you have an authenticated Exchange, the private API services, AccountService and TradeService, can be used to access private data:
// Get the account information
AccountService accountService = bitstamp.getAccountService();
AccountInfo accountInfo = accountService.getAccountInfo();
System.out.println(accountInfo.toString());
All exchange implementations expose the same API, but you can also directly access the underlying "raw" data from the individual exchanges if you need to.
The above API is usually fully supported on all exchanges and is best used for occasional requests and polling on relatively long intervals. Many exchanges, however, heavily limit the frequency that these requests can be made, and advise instead that you use their websocket API if you need streaming or real-time data.
For a smaller number of exchanges, the websocket-based StreamingExchange API is also available. This uses Reactive streams to allow you to efficiently subscribe to changes relating to thousands of coin pairs without requiring large numbers of threads.
You will need to import an additional dependency for the exchange you are using (see below), then example usage is as follows:
// Use StreamingExchangeFactory instead of ExchangeFactory
StreamingExchange exchange = StreamingExchangeFactory.INSTANCE.createExchange(BitstampStreamingExchange.class);
// Connect to the Exchange WebSocket API. Here we use a blocking wait.
exchange.connect().blockingAwait();
// Subscribe to live trades update.
Disposable subscription1 = exchange.getStreamingMarketDataService()
.getTrades(CurrencyPair.BTC_USD)
.subscribe(
trade -> LOG.info("Trade: {}", trade),
throwable -> LOG.error("Error in trade subscription", throwable));
// Subscribe order book data with the reference to the subscription.
Disposable subscription2 = exchange.getStreamingMarketDataService()
.getOrderBook(CurrencyPair.BTC_USD)
.subscribe(orderBook -> LOG.info("Order book: {}", orderBook));
// Wait for a while to see some results arrive
Thread.sleep(20000);
// Unsubscribe
subscription1.dispose();
subscription2.dispose();
// Disconnect from exchange (blocking again)
exchange.disconnect().blockingAwait();
Authentication, if supported for the exchange, works the same way as for the main API, via an ExchangeSpecification. For more information on what is supported, see the Wiki.
Now go ahead and study some more examples, download the thing and provide feedback.
More information about reactive streams can be found at the RxJava wiki.
Project Site: http://knowm.org/open-source/xchange
Example Code: http://knowm.org/open-source/xchange/xchange-example-code
Change Log: http://knowm.org/open-source/xchange/xchange-change-log/
Java Docs: http://knowm.org/javadocs/xchange/index.html
The XChange release artifacts are hosted on Maven Central: org.knowm.xchange
Add the following dependencies in your pom.xml file. You will need at least xchange-core. Add the additional dependencies for the exchange modules you are interested in (XYZ shown only for a placeholder). There is example code for all the modules in xchange-examples.
<dependency>
<groupId>org.knowm.xchange</groupId>
<artifactId>xchange-core</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>org.knowm.xchange</groupId>
<artifactId>xchange-XYZ</artifactId>
<version>6.0.0</version>
</dependency>
If it is available for your exchange, you may also want to use the streaming API:
<dependency>
<groupId>org.knowm.xchange</groupId>
<artifactId>xchange-stream-XYZ</artifactId>
<version>6.0.0</version>
</dependency>
For snapshots, add the following repository to your pom.xml file.
<repository>
<name>Central Portal Snapshots</name>
<id>central-portal-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
The current snapshot version is:
6.0.1-SNAPSHOT
| Instruction | Command |
|---|---|
| run unit tests | mvn clean test |
| run unit and integration tests | mvn clean verify -DskipIntegrationTests=false |
| install in local Maven repo | mvn clean install |
| create project javadocs | mvn javadoc:aggregate |
| generate dependency tree | mvn dependency:tree |
| check for dependency updates | mvn versions:display-dependency-updates |
| check for plugin updates | mvn versions:display-plugin-updates |
| code format | mvn com.spotify.fmt:fmt-maven-plugin:format |
| pom format/organize | mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort |
Please report any bugs or submit feature requests to XChange's Github issue tracker.
If you'd like to submit a new implementation for another exchange, please take a look at New Implementation Best Practices first, as there are lots of time-saving tips!
For more information such as a contributor list and a list of known projects depending on XChange, visit the Main Project Wiki.
XChange is an open-source project sponsored and maintained by the team at Knowm Inc., a company dedicated to neuromorphic computing and machine learning research since 2015.
Our team also powers AI Receptionist, an AI-driven automated phone system for small businesses. We leverage the same high-performance, resilient technical architecture and design principles used in XChange to ensure AI Receptionist never misses a call.
Learn more about our research at Knowm.org.
Connect with the Lead Developer: Tim Molter on LinkedIn | Tim Molter on X (Twitter)