@pump.markets/contracts-sdk
v3.6.3
Published
### Initialize Client
Downloads
81
Readme
Contracts SDK
Initialize Client
import {
createPreMarketClient,
addresses,
blastSepolia,
sepolia,
Hex,
} from "@pump.markets/contracts-sdk";
const preMarket = createPreMarketClient({
chain: blastSepolia,
// optional: rpcUrl: "https://sepolia.blast.io"
});
Create Order
const orderId = await preMarket.createOrder({
side: "BUY",
allowPartial: true,
marketId: 1,
marketAmount: "100",
paymentToken: addresses.testnet.usdb as Hex,
paymentAmount: BigInt(100 * 1e18).toString(),
collateralAmount: BigInt(100 * 1e18).toString(),
});
Get Order
const order = await preMarket.getOrder(`0x123...`);
Supported Actions
- Create Market (operator)
- Update Market (operator)
- Lock/Unlock Market (operator)
- Get Market
- Update Config (operator)
- Get Config
- Get Market Status
- Create Order
- Get Order
- Fill Order
- Settle Order
- Claim Order
- Recover Order
- Update Min Order for a token (operator)
- Get Min Order for a token
License
MIT