Documentation
¶
Overview ¶
Command quickstart checks your STX API key, lists five open markets, reads your balance and positions, and with -place-order places a 1-cent limit buy and cancels it.
It reads a profile from ~/.stx/credentials:
[ontario-production] region = ontario env = production key_id = your-key-id key_file = ~/.stx/ontario-production.pem
Run it:
go run . -profile ontario-production # read only go run . -profile ontario-production -place-order # also a 1-cent round trip
Without -profile it uses STX_PROFILE, or [default]. STX_REGION, STX_ENV, STX_HOST, STX_KEY_ID and STX_PRIVATE_KEY override the profile, so it also runs with no credentials file at all.
On production -place-order uses real money: one contract at $0.01, which rests below the market and is cancelled straight away.