All Projects → node-steam → market-pricing

node-steam / market-pricing

Licence: MIT license
Wrapper for the unofficial Steam Market Pricing API

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to market-pricing

CSGO-Overpay-Bot
No description or website provided.
Stars: ✭ 31 (+47.62%)
Mutual labels:  steam, steam-api
Steamworks
Exposing SteamWorks functions to SourcePawn.
Stars: ✭ 70 (+233.33%)
Mutual labels:  steam, steam-api
Air For Steam
An elegant and customizable skin for Steam
Stars: ✭ 1,044 (+4871.43%)
Mutual labels:  steam, skin
Threshold Skin
A Windows 10 UWP style skin for Steam
Stars: ✭ 590 (+2709.52%)
Mutual labels:  steam, skin
Steamforwarder
steam_api.dll implementation for wine. Your windows games now can interact with your linux steam! (This repo mirrors https://gitlab.com/xomachine/SteamForwarder)
Stars: ✭ 190 (+804.76%)
Mutual labels:  steam, steam-api
Archisteamfarm
C# application with primary purpose of idling Steam cards from multiple accounts simultaneously.
Stars: ✭ 7,219 (+34276.19%)
Mutual labels:  steam, steam-api
php-steam-web-api-client
Automatically generated api client for the Steam Web API.
Stars: ✭ 79 (+276.19%)
Mutual labels:  steam, steam-api
download-steam-reviews
Download Steam reviews for any game. Available on PyPI.
Stars: ✭ 26 (+23.81%)
Mutual labels:  steam, steam-api
Async Gamequery Lib
A high-performance java game query library designed for steam/source based games and others
Stars: ✭ 88 (+319.05%)
Mutual labels:  steam, steam-api
Punk
⚡ Alternative cross-platform Steam client for desktop
Stars: ✭ 87 (+314.29%)
Mutual labels:  steam, steam-api
Upmetroskin
This non-official addon for Metro for Steam fixes bugs with the current version and adds optional content for you to choose from.
Stars: ✭ 377 (+1695.24%)
Mutual labels:  steam, skin
promiviz
Visualize JavaScript Promises on the browser. Visualize the JavaScript Promise APIs and learn. It is a playground to learn about promises faster, ever!
Stars: ✭ 79 (+276.19%)
Mutual labels:  promises, promise
Hourboostr
Two programs for idling Steam game hours and trading cards
Stars: ✭ 372 (+1671.43%)
Mutual labels:  steam, steam-api
Steam Market
Find arbitrages on the Steam Market.
Stars: ✭ 25 (+19.05%)
Mutual labels:  steam, steam-api
SteamCMD-AppID-List
Complete Steam AppID List
Stars: ✭ 12 (-42.86%)
Mutual labels:  steam, steam-api
Personal Influxdb
Import data from various APIs into InfluxDB
Stars: ✭ 51 (+142.86%)
Mutual labels:  steam, steam-api
Lauhdutin
A Rainmeter skin for launching games.
Stars: ✭ 65 (+209.52%)
Mutual labels:  steam, skin
steam-stylegan2
Train a StyleGAN2 model on Colaboratory to generate Steam banners.
Stars: ✭ 30 (+42.86%)
Mutual labels:  steam, steam-api
Steamcmd Autoupdate Any Gameserver
Windows SteamCMD to autoupdate and install any game server steam cmd settings configurable lots of useful features. This batch script will keep your game servers automaticly updated updating intervals announce the server is shutting down for updates etc all configurable.
Stars: ✭ 77 (+266.67%)
Mutual labels:  steam, steam-api
Steampy
A Steam trading library for python 3
Stars: ✭ 212 (+909.52%)
Mutual labels:  steam, steam-api

Chat Travis CI Dependencies Version Downloads License Runkit

Market-Pricing is a wrapper for the unofficial Steam Market Pricing API using Typescript and Promises.

Installation

You can install Market-Pricing through the command line by using the following command:

yarn add @node-steam/market-pricing

Usage:

import {
    Currency,
    Application,
} from '@node-steam/data';

import {
    Market,
} from '@node-steam/market-pricing';

const API = new Market({ id: Application.CSGO, currency: Currency.EUR });

Documentation:

Generated Documentation

new Market(Options)

API class

Options.id: number

Application ID of the game you want to query skin/s for

We provide a enum for the most common used games.

Options.currency: number

Optional currency integer

We provide a enum for all available currencies

default = 1

Options.country: string

Optional ISO-3166 country code

Options.address: string

Optional local interface to bind for network connections

Options.timeout: number

Optional number of milliseconds before declaring the request as timed out

We recommend zeit/ms to easily convert human readable time to milliseconds. (Or just use a calculator 😏)

Options.timings: boolean

Optional - if set request timings will be returned

default = false

Options.raw: boolean

Optional - if set all objects will be returned in their raw form when set to true

default = false

Options.base: string

Optional - base domain

default = 'https://steamcommunity.com'

Options.path: string

Optional - base path

default = '/market/priceoverview'

Options.useragent: string

Optional - custom user agent for the HTTP request

default = `N|Steam Market-Pricing v${version} (https://github.com/node-steam/market-pricing)`

Options.gzip: boolean

Optional - if set GZIP compression will be used for the connection

default = true

Options.strictSSL: boolean

Optional - if set strict SSL will be forced for the connection

default = true

API.getPrice(skin: string, options?: object, callback?: function)

Get price for a skin

const x = await API.getPrice('★ Bayonet');

> {
    id: '★ Bayonet',
    price: {
        type: 'euro',
        code: 'EUR',
        sign: '€',
        lowest: 135.44,
        median: 136.61,
    },
    volume: 8,
};

API.getPrices(skins: string[], options?: object, callback?: function)

Get prices for a array of skins

const x = await API.getPrices([ '★ Falchion Knife', '★ Karambit' ]);

> [
    {
        id: '★ Falchion Knife',
        price: {
            type: 'euro',
            code: 'EUR',
            sign: '€',
            lowest: 59.86,
            median: 57.50,
        },
        volume: 27,
    },
    {
        id: '★ Karambit',
        price: {
            type: 'euro',
            code: 'EUR',
            sign: '€',
            lowest: 215,
            median: 214.74,
        },
        volume: 6,
    }
];

Differences from the raw response of the original API:

Object Layout:

Info:

You can request the raw item by setting { raw: true } in the options. This is not recommended though.

Raw:

{
    success: true,
    lowest_price: "215,--€",
    volume: "6",
    median_price: "214,74€"
}

This Module:

{
    id: '★ Karambit',
    price: {
        type: 'euro',
        code: 'EUR',
        sign: '€',
        lowest: 215,
        median: 214.74,
    },
    volume: 6,
}

Prices:

The prices aren't available as a string, but rather split up in object properties with more precise information:

Example:

Price you would get from the API:

{
    lowest_price: "57,86€",
    median_price: "59,63€"
}

Price you get from this module:

{
    type: 'euro',
    code: 'EUR',
    sign: '€',
    lowest: 59.86,
    median: 57.74,
}

Volume:

The volume (of available skins) is a integer instead of a string

Async / Promises:

The examples are shown using await for simplicity - if you don't want to make your function async you can always use .catch().then() or a callback instead.

Example:

Async:

const item = await API.getPrice('★ Bayonet');

// do something with the <item>

Promise:

API.getPrice('★ Bayonet')
.catch((error) => {
    console.error(error);
})
.then((item) => {
    // do something with the <item>
});

Callback:

API.getPrice('★ Bayonet', (error, item) => {
    if (error) {
        return console.log(error);
    }

    // do something with the <item>
});

Contributors

Contributing:

Interested in contributing to Market-Pricing? Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests.

Help:

Install required global modules:

yarn global add typescript tslint typedoc ava

Installing dependencies:

yarn

Compile:

yarn compile

Test:

yarn test

Generate Docs:

yarn docs

Tests:

This module is thoroughly tested with ava

Note: All responses from the steam API are currently mocked because of rate limiting. Might change in the future, not sure how to proceed about this though.

License:

Code licensed under MIT, documentation under CC BY 3.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].