public interface Peatio
Modifier and Type | Method and Description |
---|---|
Order[] |
clear(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature)
Cancel all my orders.
|
Order |
deleteOrder(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature,
long id)
Cancel an order.
|
Deposit |
getDeposit(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature,
String txid)
Get single deposit information.
|
Deposit[] |
getDeposits(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature,
String currency)
Get your deposits information.
|
Depth |
getDepth(String market,
Integer limit)
Get depth of specified market.
|
BigDecimal[][] |
getK(String market,
Integer limit,
Integer period,
Long timestamp)
Get OHLC(k line) of specified market.
|
KWithPendingTrades |
getKWithPendingTrades(String market,
Integer tradeId,
Integer limit,
Integer period,
Long timestamp)
Get K data with pending trades, which are the trades not included
in K data yet, because there's delay between trade generated and
processed by K data generator.
|
Market[] |
getMarkets()
Get all available markets.
|
Member |
getMe(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature)
Get your profile and accounts info.
|
Trade[] |
getMyTrades(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature,
String market,
Integer limit,
Long timestamp,
Long from,
Long to,
String orderBy)
Get your executed trades.
|
Order |
getOrder(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature,
long id)
Get information of specified order.
|
OrderBook |
getOrderBook(String market,
Integer asksLimit,
Integer bidsLimit)
Get the order book of specified market.
|
Order[] |
getOrders(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature,
String market,
String state,
Integer limit,
Integer page,
String orderBy)
Get your orders.
|
MarketTicker |
getTicker(String market)
Get ticker of specific market.
|
Map<String,MarketTicker> |
getTickers()
Get ticker of all markets.
|
Trade[] |
getTrades(String market,
Integer limit,
Long timestamp,
Integer from,
Integer to,
String orderBy)
Get recent trades on market, each trade is included only once.
|
Order[] |
placeMultiOrders(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature,
String market,
String[] sides,
BigDecimal[] volumes,
BigDecimal[] prices,
String[] ordTypes)
Create multiple sell/buy orders.
|
Order |
placeOrder(String accessKey,
si.mazi.rescu.SynchronizedValueFactory<Long> tonce,
si.mazi.rescu.ParamsDigest signature,
String market,
String side,
BigDecimal volume,
BigDecimal price,
String ordType)
Create a sell/buy order.
|
Market[] getMarkets() throws PeatioException, IOException
PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Map<String,MarketTicker> getTickers() throws PeatioException, IOException
PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.MarketTicker getTicker(String market) throws PeatioException, IOException
market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote currency code,
e.g. 'btccny'. All available markets can be found at getMarkets()
.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Member getMe(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elapsed
since Unix epoch.signature
- the signature of you request payload, generated
using your secret key.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Deposit[] getDeposits(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature, String currency) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elapsed
since Unix epoch.signature
- the signature of your request payload, generated
using your secret key.currency
- currency value.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Deposit getDeposit(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature, String txid) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elapsed
since Unix epoch.signature
- the signature of your request payload, generated
using your secret key.txid
- the transaction id.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Order[] getOrders(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature, String market, String state, Integer limit, Integer page, String orderBy) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elaapsed
since Unix epoch.signature
- the signature of your request payload, generated
using your secret key.market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote currency code,
e.g. 'btccny'. All available markets can be found at getMarkets()
.state
- filter order by state, default to 'wait'(active orders).limit
- limit the number of returned orders, default to 10.page
- specify the page of paginated results.orderBy
- if set, returned orders will be sorted in specific order,
default to 'asc'.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Order placeOrder(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature, String market, String side, BigDecimal volume, BigDecimal price, String ordType) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elapsed
since Unix epoch.signature
- the signature of your request payload, generated
using your secret key.market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote currency code,
e.g. 'btccny'. All available markets can be found at getMarkets()
.side
- either 'sell' or 'buy'.volume
- the amount user want to sell/buy. Ano order could be
partially executed, e.g. an order sell 5 btc can be matched with
a buy 3 btc order, left 2 btc to be sold; in this case the order's
volume would be '5.0', its remaining_volume would be '2.0', its executed
volume is '3.0'.price
- price for each unit. e.g. if you want to sell/buy 1 btc at
3000 CNY, the price is '3000.0'.ordType
- the order type.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Order[] placeMultiOrders(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature, String market, String[] sides, BigDecimal[] volumes, BigDecimal[] prices, String[] ordTypes) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elapsed
since Unix epoch.signature
- the signature of your request payload, generated using
your secret key.market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote
currency code, e.g. 'btccny'. All available markets can be
found at getMarkets()
.sides
- either 'sell' or 'buy'.volumes
- the amount user want to sell/buy. Ano order could be
partially executed, e.g. an order sell 5 btc can be matched with
a buy 3 btc order, left 2 btc to be sold; in this case the order's
volume would be '5.0', its remaining_volume would be '2.0', its executed
volume is '3.0'.prices
- price for each unit. e.g. if you want to sell/buy 1 btc at
3000 CNY, the price is '3000.0'.ordTypes
- the order types.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Order[] clear(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elapsed
since Unix epoch.signature
- the signature of your request payload.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Order getOrder(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature, long id) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elapsed
since Unix epoch.signature
- the signature of your request payload, genereated
using your secret key.id
- unique order id.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Order deleteOrder(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature, long id) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elapsed
since Unix epoch.signature
- the signature of your request payload, generated
using your secret key.id
- unique order id.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.OrderBook getOrderBook(String market, Integer asksLimit, Integer bidsLimit) throws PeatioException, IOException
market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote currency code,
e.g. 'btccny'. All available markets can be found at getMarkets()
.asksLimit
- limit the number of returned sell orders. Default to 20.bidsLimit
- limit the number of returned buy orders. Default to 20.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Depth getDepth(String market, Integer limit) throws PeatioException, IOException
market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote currency code,
e.g. 'btccny'. All available markets can be found at getMarkets()
.limit
- limit the number of returned price levels. Default to 300.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Trade[] getTrades(String market, Integer limit, Long timestamp, Integer from, Integer to, String orderBy) throws PeatioException, IOException
market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote currency code,
e.g. 'btccny'. All available markets can be found at getMarkets()
.limit
- limit the number of returned trades. Default to 50.timestamp
- an integer represents the seconds elapsed since Unix epoch.
If set, only trades executed before the time will be returned.from
- trade id.
If set, only trades created after the trade will be returned.to
- trade id.
If set, only trades created before the trade will be returned.orderBy
- if set, returned trades will be sorted in specific order,
default to 'desc'.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Trade[] getMyTrades(String accessKey, si.mazi.rescu.SynchronizedValueFactory<Long> tonce, si.mazi.rescu.ParamsDigest signature, String market, Integer limit, Long timestamp, Long from, Long to, String orderBy) throws PeatioException, IOException
accessKey
- access key.tonce
- tonce is an integer represents the milliseconds elapsed
since Unix epoch.signature
- the signature of your request payload, generated
using your secret key.market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote currency code,
e.g. 'btccny'. All available markets can be found at getMarkets()
.limit
- limit the number of returned trades. Default to 50.timestamp
- an integer represents the seconds elapsed since Unix epoch.
If set, only trades executed before the time will be returned.from
- trade id.
If set, only trades created after the trade will be returned.to
- trade id.
If set, only trades created before the trade will be returned.orderBy
- if set, returned trades will be sorted in specific order,
default to 'desc'.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.BigDecimal[][] getK(String market, Integer limit, Integer period, Long timestamp) throws PeatioException, IOException
market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote currency code,
e.g. 'btccny'. All available markets can be found at getMarkets()
.limit
- limit the number of returned data points, default to 30.period
- time period of K line, default to 1.
You can choose from 1, 5, 15, 30, 60, 120, 240, 360, 720, 1440, 4320, 10080.timestamp
- an integer represents the seconds elapsed since Unix epoch.
If set, only k-line data after that time will be returned.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.KWithPendingTrades getKWithPendingTrades(String market, Integer tradeId, Integer limit, Integer period, Long timestamp) throws PeatioException, IOException
market
- unique market id. It's always in the form of xxxyyy,
where xxx is the base currency code, yyy is the quote currency code,
e.g. 'btccny'. All available markets can be found at getMarkets()
.tradeId
- the trade id of the first trade you received.limit
- limite the number of returned data points, default to 30.period
- time period of K line, default to 1. You can choose from
1, 5, 15, 30, 60, 120, 240, 360, 720, 1440, 4320, 10080.timestamp
- an integer represents the seconds elapsed since Unix epoch.
If set, only k-line data after that time will be returned.PeatioException
- indicates peatio exchange exception.IOException
- indicates I/O exception.Copyright © 2015. All rights reserved.