Package com.knowm.xchange.serum
Class SerumAdapters
java.lang.Object
com.knowm.xchange.serum.SerumAdapters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Market
getMarket
(CurrencyPair pair) static String
getSolanaDataTypeAddress
(CurrencyPair pair, String dataType) Extracts the address associated to a currency pair's specific data type.static void
Serum represents markets as individual Solana addresses.static String
toSolanaAddress
(CurrencyPair pair) Extracts the address associated to a currency pair
-
Constructor Details
-
SerumAdapters
public SerumAdapters()
-
-
Method Details
-
loadMarkets
Serum represents markets as individual Solana addresses. As part of starting up the the scaffold for Serum we load all the "markets" from the REST api and associate currency pairs to their addresses and metadata.The markets file maintained in XChange should mirror the one found: https://github.com/project-serum/serum-ts/blob/master/packages/serum/src/markets.json
- Parameters:
raw
- service to use to query for data- Throws:
Exception
-
toSolanaAddress
Extracts the address associated to a currency pair- Parameters:
pair
- to query address for- Returns:
- address as string
-
getSolanaDataTypeAddress
Extracts the address associated to a currency pair's specific data type. Serum manages the different parts of an order's lifecycle by using different addresses. e.g.request queue (submitted orders) event queue (fills) bids (orderbook bids) asks (orderbook asks)
- Parameters:
pair
- to query address for- Returns:
- address as string
-
getMarket
-