mirror of
https://github.com/mempool/mempool.git
synced 2025-01-09 23:16:48 +01:00
241 lines
4.6 KiB
TypeScript
241 lines
4.6 KiB
TypeScript
|
|
||
|
export interface BisqBlocks {
|
||
|
chainHeight: number;
|
||
|
blocks: BisqBlock[];
|
||
|
}
|
||
|
|
||
|
export interface BisqBlock {
|
||
|
height: number;
|
||
|
time: number;
|
||
|
hash: string;
|
||
|
previousBlockHash: string;
|
||
|
txs: BisqTransaction[];
|
||
|
}
|
||
|
|
||
|
export interface BisqTransaction {
|
||
|
txVersion: string;
|
||
|
id: string;
|
||
|
blockHeight: number;
|
||
|
blockHash: string;
|
||
|
time: number;
|
||
|
inputs: BisqInput[];
|
||
|
outputs: BisqOutput[];
|
||
|
txType: string;
|
||
|
txTypeDisplayString: string;
|
||
|
burntFee: number;
|
||
|
invalidatedBsq: number;
|
||
|
unlockBlockHeight: number;
|
||
|
}
|
||
|
|
||
|
export interface BisqStats {
|
||
|
minted: number;
|
||
|
burnt: number;
|
||
|
addresses: number;
|
||
|
unspent_txos: number;
|
||
|
spent_txos: number;
|
||
|
}
|
||
|
|
||
|
interface BisqInput {
|
||
|
spendingTxOutputIndex: number;
|
||
|
spendingTxId: string;
|
||
|
bsqAmount: number;
|
||
|
isVerified: boolean;
|
||
|
address: string;
|
||
|
time: number;
|
||
|
}
|
||
|
|
||
|
interface BisqOutput {
|
||
|
txVersion: string;
|
||
|
txId: string;
|
||
|
index: number;
|
||
|
bsqAmount: number;
|
||
|
btcAmount: number;
|
||
|
height: number;
|
||
|
isVerified: boolean;
|
||
|
burntFee: number;
|
||
|
invalidatedBsq: number;
|
||
|
address: string;
|
||
|
scriptPubKey: BisqScriptPubKey;
|
||
|
time: any;
|
||
|
txType: string;
|
||
|
txTypeDisplayString: string;
|
||
|
txOutputType: string;
|
||
|
txOutputTypeDisplayString: string;
|
||
|
lockTime: number;
|
||
|
isUnspent: boolean;
|
||
|
spentInfo: SpentInfo;
|
||
|
opReturn?: string;
|
||
|
}
|
||
|
|
||
|
interface BisqScriptPubKey {
|
||
|
addresses: string[];
|
||
|
asm: string;
|
||
|
hex: string;
|
||
|
reqSigs: number;
|
||
|
type: string;
|
||
|
}
|
||
|
|
||
|
interface SpentInfo {
|
||
|
height: number;
|
||
|
inputIndex: number;
|
||
|
txId: string;
|
||
|
}
|
||
|
|
||
|
export interface BisqTrade {
|
||
|
direction: string;
|
||
|
price: string;
|
||
|
amount: string;
|
||
|
volume: string;
|
||
|
payment_method: string;
|
||
|
trade_id: string;
|
||
|
trade_date: number;
|
||
|
}
|
||
|
|
||
|
export interface Currencies { [txid: string]: Currency; }
|
||
|
|
||
|
export interface Currency {
|
||
|
code: string;
|
||
|
name: string;
|
||
|
precision: number;
|
||
|
type: string;
|
||
|
}
|
||
|
|
||
|
export interface Depth { [market: string]: Market; }
|
||
|
|
||
|
interface Market {
|
||
|
'buys': string[];
|
||
|
'sells': string[];
|
||
|
}
|
||
|
|
||
|
export interface HighLowOpenClose {
|
||
|
period_start: number;
|
||
|
open: string;
|
||
|
high: string;
|
||
|
low: string;
|
||
|
close: string;
|
||
|
volume_left: string;
|
||
|
volume_right: string;
|
||
|
avg: string;
|
||
|
}
|
||
|
|
||
|
export interface Markets { [txid: string]: Pair; }
|
||
|
|
||
|
interface Pair {
|
||
|
pair: string;
|
||
|
lname: string;
|
||
|
rname: string;
|
||
|
lsymbol: string;
|
||
|
rsymbol: string;
|
||
|
lprecision: number;
|
||
|
rprecision: number;
|
||
|
ltype: string;
|
||
|
rtype: string;
|
||
|
name: string;
|
||
|
}
|
||
|
|
||
|
export interface Offers { [market: string]: OffersMarket; }
|
||
|
|
||
|
interface OffersMarket {
|
||
|
buys: Offer[] | null;
|
||
|
sells: Offer[] | null;
|
||
|
}
|
||
|
|
||
|
export interface OffsersData {
|
||
|
direction: string;
|
||
|
currencyCode: string;
|
||
|
minAmount: number;
|
||
|
amount: number;
|
||
|
price: number;
|
||
|
date: number;
|
||
|
useMarketBasedPrice: boolean;
|
||
|
marketPriceMargin: number;
|
||
|
paymentMethod: string;
|
||
|
id: string;
|
||
|
currencyPair: string;
|
||
|
primaryMarketDirection: string;
|
||
|
priceDisplayString: string;
|
||
|
primaryMarketAmountDisplayString: string;
|
||
|
primaryMarketMinAmountDisplayString: string;
|
||
|
primaryMarketVolumeDisplayString: string;
|
||
|
primaryMarketMinVolumeDisplayString: string;
|
||
|
primaryMarketPrice: number;
|
||
|
primaryMarketAmount: number;
|
||
|
primaryMarketMinAmount: number;
|
||
|
primaryMarketVolume: number;
|
||
|
primaryMarketMinVolume: number;
|
||
|
}
|
||
|
|
||
|
export interface Offer {
|
||
|
offer_id: string;
|
||
|
offer_date: number;
|
||
|
direction: string;
|
||
|
min_amount: string;
|
||
|
amount: string;
|
||
|
price: string;
|
||
|
volume: string;
|
||
|
payment_method: string;
|
||
|
offer_fee_txid: any;
|
||
|
}
|
||
|
|
||
|
export interface Tickers { [market: string]: Ticker | null; }
|
||
|
|
||
|
export interface Ticker {
|
||
|
last: string;
|
||
|
high: string;
|
||
|
low: string;
|
||
|
volume_left: string;
|
||
|
volume_right: string;
|
||
|
buy: string | null;
|
||
|
sell: string | null;
|
||
|
}
|
||
|
|
||
|
export interface Trade {
|
||
|
direction: string;
|
||
|
price: string;
|
||
|
amount: string;
|
||
|
volume: string;
|
||
|
payment_method: string;
|
||
|
trade_id: string;
|
||
|
trade_date: number;
|
||
|
}
|
||
|
|
||
|
export interface TradesData {
|
||
|
currency: string;
|
||
|
direction: string;
|
||
|
tradePrice: number;
|
||
|
tradeAmount: number;
|
||
|
tradeDate: number;
|
||
|
paymentMethod: string;
|
||
|
offerDate: number;
|
||
|
useMarketBasedPrice: boolean;
|
||
|
marketPriceMargin: number;
|
||
|
offerAmount: number;
|
||
|
offerMinAmount: number;
|
||
|
offerId: string;
|
||
|
depositTxId?: string;
|
||
|
currencyPair: string;
|
||
|
primaryMarketDirection: string;
|
||
|
primaryMarketTradePrice: number;
|
||
|
primaryMarketTradeAmount: number;
|
||
|
primaryMarketTradeVolume: number;
|
||
|
|
||
|
_market: string;
|
||
|
_tradePrice: string;
|
||
|
_tradeAmount: string;
|
||
|
_tradeVolume: string;
|
||
|
_offerAmount: string;
|
||
|
}
|
||
|
|
||
|
export interface MarketVolume {
|
||
|
period_start: number;
|
||
|
volume: string;
|
||
|
num_trades: number;
|
||
|
}
|
||
|
|
||
|
export interface MarketsApiError {
|
||
|
success: number;
|
||
|
error: string;
|
||
|
}
|
||
|
|
||
|
export type Interval = 'minute' | 'half_hour' | 'hour' | 'half_day' | 'day' | 'week' | 'month' | 'year' | 'auto';
|