Repository navigation
grvt builder
github-actions[bot] edited this page Sep 7, 2026
·
1 revision
// @NO_AUTO_TRANSPILE
import ccxt from '../../js/ccxt.js';
async function example() {
const exchange = new ccxt.grvt({});
exchange.privateKey = process.env.GRVT_PRIVATE_KEY || '';
let volume = 0;
let fee = 0;
await exchange.signIn();
const daysToCheck = 30;
// paginate through entries paginate day by day using since and until
const now = exchange.milliseconds();
const day = 24 * 60 * 60 * 1000;
for (let i = 0; i < daysToCheck; i++) {
const since = now - (i + 1) * day;
const until = now - i * day;
const sinceIso = exchange.iso8601(since);
const untilIso = exchange.iso8601(until);
console.log('Fetching rebates for day ', i + 1, ': from ', sinceIso, ' to ', untilIso);
const rebates = await exchange.privateTradingPostFullV1BuilderFillHistory({ 'start_time': (since * 1000000).toString(), 'end_time': (until * 1000000).toString(), 'limit': 1000 });
console.log('Fetched ', rebates.result.length, ' rebates for day ', i + 1);
let volumeForDay = 0;
for (const rebate of rebates.result) {
const currentVolume = rebate.size * rebate.price;
volumeForDay += currentVolume;
fee += rebate.fee / 1000000;
}
console.log('Volume for day ', i + 1, ': ', volumeForDay);
volume += volumeForDay;
}
console.log('Total volume for last ', daysToCheck, ' days: ', volume);
console.log('Total fee for last ', daysToCheck, ' days: ', fee);
}
await example();(If the page is not being rendered for you, you can refer to the mirror at https://docs.ccxt.com/)
- Install
- Examples
- Manual
- CCXT Pro
- Contributing
- Supported Exchanges
- Exchanges By Country
- API Spec By Method
- Order Router
- FAQ
- Changelog
- Awesome
- API Spec by Exchange
- alpaca
- apex
- aster
- backpack
- bigone
- binance
- bingx
- bit2c
- bitbank
- bitbns
- bitfinex
- bitflyer
- bitget
- bithumb
- bitopro
- bitrue
- bitso
- bitstamp
- bitteam
- bittrade
- bitvavo
- blockchaincom
- blofin
- btcbox
- btcmarkets
- btcturk
- btse
- bullish
- bybit
- bydfi
- cex
- coinbase
- coinbaseexchange
- coinbaseinternational
- coincheck
- coinmate
- coinone
- coinsph
- coinspot
- cryptocom
- cryptomus
- deepcoin
- delta
- deribit
- derive
- digifinex
- dydx
- extended
- foxbit
- gate
- gemini
- grvt
- hashkey
- hibachi
- hitbtc
- hollaex
- htx
- hyperliquid
- independentreserve
- indodax
- kraken
- krakenfutures
- kucoin
- kucoinfutures
- latoken
- lbank
- lighter
- luno
- mercado
- mexc
- modetrade
- mudrex
- nado
- ndax
- okx
- onetrading
- p2b
- pacifica
- paradex
- paymium
- phemex
- poloniex
- polymarket
- revolutx
- tokocrypto
- toobit
- upbit
- weex
- whitebit
- woo
- woofipro
- xt
- zaif
- zebpay
- API Spec by Prediction Exchange