Services investing Exchange PIRATE Block Explorer FAQ Donate now

Public API




Pairs


The /botapi/pairs provides a summary on cryptoasset trading pairs available on the exchange.

https://piratecash.net/botapi/pairs

{
    "ticker_id":"PIRATE_DOGE",
    "base":"PIRATE",
    "target":"DOGE"
}
NameData TypeCategoryDescription
ticker_idstringMandatoryIdentifier of a ticker with delimiter to separate base/target, eg. PIRATE_DOGE
basestringMandatorySymbol/currency code of a the base cryptoasset, eg. PIRATE
targetstringMandatorySymbol/currency code of the target cryptoasset, eg. DOGE



Tickers


The /botapi/tickers endpoint provides 24-hour pricing and volume information on each market pair available on an exchange.

https://piratecash.net/botapi/tickers

{
    "ticker_id":"PIRATE_DOGE",
    "base_currency":"PIRATE",
    "target_currency":"DOGE",
    "last_price":"0.10100000",
    "base_volume":"170.08518227",
    "target_volume":"17.3934613185500000",
    "bid":"0.10100000",
    "ask":"0.10800000",
    "high":"0.10500000",
    "low":"0.10100000",
    "time":"2021-12-30 02:01:26.583777"
}
NameData TypeCategoryDescription
ticker_idstringMandatoryIdentifier of a ticker with delimiter to separate base/target, eg. PIRATE_DOGE
base_currencystringMandatorySymbol/currency code of base pair, eg. PIRATE
target_currencystringMandatorySymbol/currency code of target pair, eg. DOGE
last_pricedecimalMandatoryLast transacted price of base currency based on given target currency
base_volumedecimalMandatory24 hour trading volume in base pair volume
target_volumedecimalMandatory24 hour trading volume in target pair volume
biddecimalMandatoryCurrent highest bid price
askdecimalMandatoryCurrent lowest ask price
highdecimalMandatoryRolling 24-hours highest transaction price
lowdecimalMandatoryRolling 24-hours lowest transaction price



Orderbook


The /botapi/orderbook/pirate/coin endpoint is to provide order book for a given market pair/ticker

https://piratecash.net/botapi/orderbook/pirate/cosa - PirateCash/Cosanta

https://piratecash.net/botapi/orderbook/pirate/doge - PirateCash/Dogecoin

https://piratecash.net/botapi/orderbook/pirate/btc - PirateCash/Bitcoin

{
    "ticker_id":"PIRATE_COSA",
    "timestamp":"1640858350.1946392",
    "bids":[
	{"price":"0.00180000","quantity":"0.00325598"},
	{"price":"0.00053500","quantity":"1500.00000000"},
	{"price":"0.00052500","quantity":"1500.00000000"},
    "asks":[
	{"price":"0.00195000","quantity":"1000.01336000"},
	{"price":"0.00200000","quantity":"1000.00000000"},
	{"price":"0.00220000","quantity":"1000.00000000"}]
}
NameData TypeCategoryDescription
ticker_idstringMandatoryA pair such as "PIRATE_COSA", with delimiter between different cryptoassets
timestamptimestampMandatoryUnix timestamp in milliseconds for when the last updated time occurred.
bidsdecimalMandatoryAn array containing 2 elements. The offer price and quantity for each bid order
asksdecimalMandatoryAn array containing 2 elements. The ask price and quantity for each ask order



Historical Data


The /botapi/historical_trades/pirate/coin is used to return data on historical completed trades for a given market pair (last 1000 trades).

https://piratecash.net/botapi/historical_trades/pirate/cosa - PirateCash/Cosanta

https://piratecash.net/botapi/historical_trades/pirate/doge - PirateCash/Dogecoin

https://piratecash.net/botapi/historical_trades/pirate/btc - PirateCash/Bitcoin

{
    "ticker_id":"PIRATE_BTC",
    "timestamp":"1640864571.9212558",
    "historical_trades":[
	{
	"trade_id":"45934",
	"price":"3.8E-7",
	"base_volume":"57.15436715",
	"target_volume":"0.0000217186595170",
	"trade_timestamp":"1640805271",
	"type":"SELL"
	},{
	"trade_id":"45934",
	"price":"3.9E-7",
	"base_volume":"1000.00000000",
	"target_volume":"0.0003900000000000",
	"trade_timestamp":"1640805270",
	"type":"SELL"
	}]
}
NameData TypeCategoryDescription
ticker_idstringMandatoryA pair such as "PIRATE_COSA", with delimiter between different cryptoassets
timestamptimestampMandatoryUnix timestamp in milliseconds for when the last updated time occurred.
trade_idintegerMandatoryA unique ID associated with the trade for the currency pair transaction
pricedecimalMandatoryTransaction price in base pair volume.
base_volumedecimalMandatoryTransaction amount in base pair volume.
target_volumedecimalMandatoryTransaction amount in target pair volume.
trade_timestamptimestampMandatoryUnix timestamp in milliseconds for when the transaction occurred.
typestringMandatory

Used to determine the type of the transaction that was completed.

Buy – Identifies an ask that was removed from the order book.

Sell – Identifies a bid that was removed from the order book.