trade-bot.js 426 B

12345678910111213141516
  1. #!/usr/bin/env node
  2. // Script to infinitely post orders that are immediately filled.
  3. const process = require("process");
  4. const anchor = require("@project-serum/anchor");
  5. const PublicKey = anchor.web3.PublicKey;
  6. const { runTradeBot } = require("../tests/utils");
  7. async function main() {
  8. const market = new PublicKey(process.argv[2]);
  9. const provider = anchor.Provider.local();
  10. runTradeBot(market, provider);
  11. }
  12. main();