Files
gocryptotrader/gctscript/examples/verbose.gct
Adrian Gallagher c785ae73a7 exchanges: Remove FTX implementation and fix minor test issues (#1100)
* exchanges: Start removal of FTX

* Get tests happy again

* okx: improve logic and add basic coverage

* Fix linterino

* Round 2 plus rm useless assignment in test

* Fix exchange_wrapper_issues test error

* Fix nitters

* Address nitters
2023-01-25 16:40:04 +11:00

27 lines
942 B
Plaintext

global := import("global")
exch := import("exchange")
fmt := import("fmt")
load := func() {
// 'ctx' is already defined when we construct our bytecode from file.
// It contains script ID and shortname of file as save details to default
// script output directory.
// Set verbosity func allows the setting of rest request verbosity to
// specifically log out this scripts interaction with any http outbound
// request for debugging purposes.
ctx = global.set_verbose(ctx)
// Any verbose logs will be output according to logger settings defined in the config
// NOTE: Get account info is cached and updated by another worker thread
// therefore calling this script multiple times, if data has already been
// fetched request verbosity will be limited.
info := exch.accountinfo(ctx, "binance", "spot")
if is_error(info) {
// handle error
}
fmt.println(info)
}
load()