UNPKG

pmarket-cli

Version:
20 lines 611 B
import { Side } from "@polymarket/clob-client"; export class BuyStrategy { polymarketService; constructor(polymarketService) { this.polymarketService = polymarketService; } async execute(options) { const tokenId = options.buy[0]; const size = +options.buy[1]; const price = +options.buy[2]; try { const order = await this.polymarketService.marketOrder(tokenId, Side.BUY, size, price); console.log(order); } catch (error) { console.error(error); } } } //# sourceMappingURL=buy-strategy.js.map