thales-data
v3.0.32
Published
[](https://badge.fury.io/js/thales-data) [.
Supported queries
The below all return a Promise that resolves with the requested results.
Thales
Markets
binaryOptions.marketsGet all positional markets created.binaryOptions.optionTransactionsGet all transactions made to the positional markets.binaryOptions.tradesGet all trades made to the positional markets.binaryOptions.positionBalances({ account })Get balances of positions for theaccount.binaryOptions.rangedPositionBalances({ account })Get balances of ranged positions for theaccount.
Token
binaryOptions.tokenTransactions({ account })Get all the transactions made with THALES token from theaccount.binaryOptions.stakersGet all THALES stakers.
Vaults
binaryOptions.vaultTransactions({ vault })Get all the transactions made by thevault.binaryOptions.vaultPnls({ vault })Get all round PNLs for thevault.binaryOptions.vaultUserTransactions({ vault })Get all user transactions for thevault.
Liquidity Pool
binaryOptions.vaultPnls({ liquidityPool })Get all round PNLs for theliquidityPool.binaryOptions.liquidityPoolUserTransactions({ liquidityPool })Get all user transactions for theliquidityPool.
Overtime
Markets
sportMarkets.marketsGet all sports markets created.sportMarkets.positionBalances({ account })Get balances of positions for theaccount.sportMarkets.marketTransactionsGet all transactions made to the sports markets.sportMarkets.overtimeVouchers({ account })Get all Overtime vouchers for theaccount.
Vaults
sportMarkets.vaultTransactions({ vault })Get all the transactions made by thevault.sportMarkets.vaultPnls({ vault })Get all round PNLs for thevault.sportMarkets.vaultUserTransactions({ vault })Get all user transactions for thevault.
Liquidity Pool
sportMarkets.vaultPnls({ liquidityPool })Get all round PNLs for theliquidityPool.sportMarkets.liquidityPoolUserTransactions({ liquidityPool })Get all user transactions for theliquidityPool.
Use this as a node or webpack dependency
const thalesData = require('thales-data'); // common js
// or
import thalesData from 'thales-data'; // es modules
// query and log resolved results
thalesData.binaryOptions
.markets({
network: 1, // mainnet
max: 1000, // return first 1000 records
})
.then(markets => console.log(markets));Use in a browser
<script src="https://cdn.jsdelivr.net/npm/thales-data/browser.js"></script>
<script>
window.thalesData.binaryOptions
.markets({
network: 1, // mainnet
max: 1000, // return first 1000 records
})
.then(console.log);
</script>How to query via the npm library (CLI)
# get markets ordered from latest to earliest
npx thales-data binaryOptions.markets