Waxpeer module that makes it easy to sell your items via p2p system
Installations
npm install waxpeer-ts
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
20.10.0
NPM Version
10.2.3
Score
55
Supply Chain
95.2
Quality
74.9
Maintenance
100
Vulnerability
98.9
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (100%)
Developer
okanaslan
Download Statistics
Total Downloads
189
Last Day
1
Last Week
1
Last Month
3
Last Year
189
GitHub Statistics
42 Commits
1 Branches
1 Contributors
Bundle Size
114.76 kB
Minified
37.19 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.0
Package Id
waxpeer-ts@1.1.0
Unpacked Size
198.05 kB
Size
33.56 kB
File Count
44
NPM Version
10.2.3
Node Version
20.10.0
Publised On
03 Jan 2024
Total Downloads
Cumulative downloads
Total Downloads
189
Last day
0%
1
Compared to previous day
Last week
0%
1
Compared to previous week
Last month
0%
3
Compared to previous month
Last year
0%
189
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
6
Dev Dependencies
5
WaxPeer API wrapper for Node.js
Full API documentation here
Trade websocket documentation here
Installation
1$ npm install waxpeer
Initialization
1import { Waxpeer, TradeWebsocket, WebsiteWebsocket } from "waxpeer"; 2 3//API wrapper 4const WP = new Waxpeer(WAXPEER_API); 5//Trade websocket 6const TS = new TradeWebsocket(WAXPEER_API, STEAM_ID, TRADELINK); 7//Website websocket 8const WS = new WebsiteWebsocket(WAXPEER_API, ["add_item", "remove", "update_item"]);
Fetch your user data
1const user = await WP.getProfile(); 2console.log(user);
Fetch your trades and transactions history
1const history = WP.myHistory(0, "2022-11-11", "2022-12-12", "DESC"); 2console.log(history);
Change your tradelink
1let data = await WP.changeTradeLink("https://steamcommunity.com/tradeoffer/new/?partner=900267897&token=P2YkRJOk"); 2console.log(data);
Save new Steam API key
1let data = await WP.setMyKeys("11EDA9771EB4A200B579A530009CC000"); 2console.log(data);
Buy items using item_id and send to specific tradelink
1const purchase = await WP.buyItemWithId(17441538677, 798500, "oFvyi0Ma", "378049039"); 2console.log(purchase);
Buy item by name and send to specific tradelink
1const purchase = await WP.buyItemWithName("AK-47 | Redline (Field-Tested)", 15000, "oFvyi0Ma", "378049039", null, "csgo"); 2console.log(purchase);
Fetch all unique items and their min price and count
1const items = await WP.getPrices("csgo"); 2console.log(items);
Fetch all dopplers phases by filters
1const items = await WP.getPricesDopplers("any"); 2console.log(items);
Fetch all listings by names
1const items = await WP.massInfo(["AK-47 | Redline (Field-Tested)", "csgo"]); 2console.log(items);
Search available items by name(s)
1const items = await WP.searchItems(["AK-47 | Redline (Field-Tested)", "csgo"]); 2console.log(items);
Checking the status of many steam trades by project_id identifier
1const items = await WP.customTradeRequest(["my_id_1", "my_id_2"]); 2console.log(items);
Checking the status of many steam trades by Waxpeer ids
1const items = await WP.tradeRequestStatus(["12345", "23456"]); 2console.log(items);
Fetches available item(s) based on the item_id(s) passed in query
1const items = await WP.checkItemAvailability(["17441538677", "17441538678"]); 2console.log(items);
Check tradelink validity
1const data = await WP.validateTradeLink("https://steamcommunity.com/tradeoffer/new/?partner=900267897&token=P2YkRJOk"); 2console.log(data);
Get recent purchases by filters
1const data = await WP.getHistory("153912146", "ssR242yo"); 2console.log(data);
Fetch trades that need to be sent
1const data = await WP.readyToTransferP2P("11EDA9771EB4A200B579A530009CC000"); 2console.log(data);
Force p2p status check. Recommended for usage with poor network connections
1const data = await WP.checkWssUser("765611983383140000"); 2console.log(data);
Edit price for listed items
1const data = await WP.editItems([{ item_id: 1, price: 1 }], "csgo"); 2console.log(data);
Fetch my inventory
1const data = await WP.fetchInventory("csgo"); 2console.log(data);
Get items that you can list for sale
1const data = await WP.getMyInventory(0, "csgo"); 2console.log(data);
Get listed steam items
1const data = await WP.myListedItems("csgo"); 2console.log(data);
List steam items from inventory
1const data = await WP.listItemsSteam([{ item_id: 1, price: 1 }], "csgo"); 2console.log(data);
Remove item(s) by item id(s)
1const data = await WP.removeItems([1, 2, 3, 4]); 2console.log(data);
Remove all listings
1const data = await WP.removeAll("csgo"); 2console.log(data);
Buy order trigger history
1const data = await WP.buyOrderHistory(0, "csgo"); 2console.log(data);
Active buy orders. Sorted by price DESC, if a filter by name is specified
1const data = await WP.buyOrders(0, "AK-47 | Redline (Field-Tested)", "1", "csgo"); 2console.log(data);
Create a buy order to auto purchase items. Currently independent of the p2p status of the user
1const data = await WP.createBuyOrder("AK-47 | Redline (Field-Tested)", 5, 15000, "csgo"); 2console.log(data);
Edit buy order
1const data = await WP.editBuyOrder(123, 5, 1000); 2console.log(data);
Remove buy order(s)
1const data = await WP.removeBuyOrder([1, 2, 3]); 2console.log(data);
Remove all buy orders by filters
1const data = await WP.removeAllOrders("csgo"); 2console.log(data);
Fetches items based on the game you pass as a query
1const data = await WP.getItemsList(0, null, "knife", "DESC"); 2console.log(data);
Fetches recommended item price and other info
1const data = await WP.getSteamItems(730); 2console.log(data);
Merchant. Check if user is in system
1const data = await WP.getMerchantUser("76561198000000000", "my_merchant"); 2console.log(data);
Merchant. Insert a user into a system
1const data = await WP.postMerchantUser("my_merchant", "https://steamcommunity.com/tradeoffer/new/?partner=900267897&token=P2YkRJOk", "76561198000000000"); 2console.log(data);
Merchant. Fetch user inventory
1const data = await WP.MerchantInventoryUpdate("76561198000000000", "my_merchant"); 2console.log(data);
Merchant. Get items that you can list for the user
1const data = await WP.MerchantInventory("76561198000000000", "my_merchant", 730); 2console.log(data);
Merchant. List steam items from inventory
1const data = await WP.MerchantListItemsSteam("my_merchant", "76561198000000000", [{ item_id: 1, price: 1 }]); 2console.log(data);
Merchant. Returns history of deposits
1const data = await WP.MerchantDepositsHistory("my_merchant", "76561198000000000", "aaabe17b-dddd-4444-affd-dcad3fa6fbbe"); 2console.log(data);
Trade websocket events that you need to implement
1TS.on("send-trade", (message: TradeWebsocketCreateTradeData) => { 2 console.log(message); 3}); 4TS.on("cancelTrade", (message: TradeWebsocketCancelTradeData) => { 5 console.log(message); 6}); 7TS.on("accept_withdraw", (message: TradeWebsocketAcceptWithdrawData) => { 8 console.log(message); 9});
Website websocket events
1//manual sub events 2WS.on("add_item", (message: ItemChangeEvent) => { 3 console.log(message); //waxpeer new item event 4}); 5WS.on("remove", (message: ItemChangeEvent) => { 6 console.log(message); //waxpeer item removed event 7}); 8WS.on("update_item", (message: UpdateItemEvent) => { 9 console.log(message); //waxpeer item price change event 10}); 11//auto sub after auth 12WS.on("change_user", (message: ChangeUserEvent) => { 13 if (message.name === "wallet") console.log(message); //balance change event 14}); 15WS.on("updated_item", (message: UpdatedItemEvent) => { 16 console.log(message); //trade status change event 17});
API error handling
1try { 2 let user = await WP.getProfile(); 3 console.log(user); 4} catch (e) { 5 let timeout = axios.isCancel(e) ? true : false; 6 let response = e?.response?.data; 7 let status_code = e?.response?.status; 8 console.log({ timeout, status_code, response }); //{ timeout: false, status_code: 403, response: { success: false, msg: 'wrong api' } } 9}
No vulnerabilities found.
No security vulnerabilities found.