https://github.com/nadirhaciyev/steamwebapi-trade-bot
The official Node.js / Typescript library for the Steamwebapi API
https://github.com/nadirhaciyev/steamwebapi-trade-bot
api counter-strike javascript node nodejs steam steam-api steamwebapi typescript valve wrapper wrapper-api
Last synced: about 2 months ago
JSON representation
The official Node.js / Typescript library for the Steamwebapi API
- Host: GitHub
- URL: https://github.com/nadirhaciyev/steamwebapi-trade-bot
- Owner: NadirHaciyev
- License: mit
- Created: 2024-01-28T09:23:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-07T13:21:46.000Z (over 2 years ago)
- Last Synced: 2025-03-16T02:39:56.146Z (about 1 year ago)
- Topics: api, counter-strike, javascript, node, nodejs, steam, steam-api, steamwebapi, typescript, valve, wrapper, wrapper-api
- Language: TypeScript
- Homepage: https://www.steamwebapi.com/api/doc/
- Size: 122 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Steamwebapi Trade Bot
Wrapper created for
Steamwebapi
This library provides convenient access to the Steamwebapi REST API from TypeScript or JavaScript.
To learn how to use the Steamwebapi API, check out our [API Reference](https://www.steamwebapi.com/api/list) and [Documentation](https://www.steamwebapi.com/api/doc/steam-trading-bot-api).
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [Config Defaults](#config-defaults)
- [Handling Errors](#handling-errors)
- [Examples](#examples)
- [Contributing](#contributing)
- [License](#license)
## Installation
```bash
pnpm add steamwebapi-trade-bot
# or
npm install steamwebapi-trade-bot
# or
yarn add steamwebapi-trade-bot
```
## Usage
To use this wrapper, you first need to obtain an API key from the Steam Web API. Follow these steps to get your API key:
1. Go to the [Steam Web API Key Page](https://steamwebapi.com).
2. Log in with your Steam account. If you do not have an account, you will need to create one.
3. Fill in the required information to request an API key. This key will be necessary to access the Steam Web API.
The code below shows how to get started using the Steamwebapi Trade Bot API.
```ts
import Trade from "steamwebapi-trade-bot";
// Create instance by providing API Key
const trade = new Trade("STEAMWEBAPI_API_KEY");
// Get Trade Offers
async function main() {
const offers = await trade.getOffers({ /* options */ });
console.log(offers.data);
}
main();
```
### Config Defaults
You can specify config defaults that will be applied to every request.
**Custom instance defaults**
```ts
// Set config defaults when creating the instance
const trade = new Trade("STEAMWEBAPI_API_KEY", { assetid: "ASSET_ID" });
// Override per-request:
await trade.getOffers({ assetid: "NEW_ASSET_ID" });
```
**Global trade defaults**
```ts
trade.defaults.assetid = "ASSET_ID";
trade.defaults.steamcommunityapikey = "STEAM_COMMUNITY_API_KEY";
```
## Examples
For more examples check the [examples directory](https://github.com/NadirHaciyev/steamwebapi-trade-bot/tree/main/examples).
## Contributing
Contributions to this project are welcome! If you encounter a bug or have a feature request, feel free to open an issue. Pull requests with improvements or new features are also appreciated.
## License
This API wrapper is licensed under the [MIT License](LICENSE).