Skip to main content

API for warframe market.

Project description

pywmapi

github action packaging test badge pypi package version badge python version badge license badge star badge

PYthon Warframe Market API(pywmapi)

๐Ÿ”ฅ API for warframe market, implemented in Python.

"Thank you tinsuit, a fine trade. Transaction complete, haha!" -- Maroo

For now, the implemented function is listed below:

  • auth
    • โœ… sign in
    • ๐Ÿ†– register
    • ๐Ÿ†– restore password
  • profile
    • โœ… get current user's profile
    • ๐Ÿ”ฒ manage current user profile
    • โœ… get a user's profile
    • ๐Ÿ”ฒ get all of a user's achievements
    • ๐Ÿ”ฒ get all of a user's reviews
    • โœ… set current user's online/offline status
  • items
    • โœ… list all tradable items
    • โœ… get info about an item
  • statistics
    • โœ… get statistics of an item
    • ๐Ÿ”ฒ get global market statistics
  • orders
    • โœ… get orders of a single item
    • ๐Ÿ”ฒ get orders for the last 4 hours
    • โœ… update a single order on the current profile
    • โœ… delete a single order on the current profile
    • โœ… add a new order for the current profile
    • ๐Ÿ”ฒ get user's sale statistics(closed orders)
    • โœ… get all of a user's orders
  • liches
    • โœ… list all lich weapons
    • โœ… list all lich ephemeras
    • โœ… list all lich quirks
  • rivens
    • โœ… list all riven items
    • โœ… get a list of riven attributes
  • misc
    • ๐Ÿ”ฒ get a list of all known game locations
    • ๐Ÿ”ฒ get a list of all known npcs
    • ๐Ÿ”ฒ get a list of all known missions
  • auctions
    • โœ… create auction โš ๏ธ
    • ๐Ÿ”ฒ get a list of riven auctions by given search params
    • ๐Ÿ”ฒ get a list of lich auctions by given search params
  • auction entry๏ธ
    • ๐Ÿ”ฒ get info about auction by auction id
    • ๐Ÿ”ฒ get auction bids by auction id

Symbols:

  • โœ…: implemented
  • ๐Ÿ†–: unavailable due to some intractable problem
  • ๐Ÿ”ฒ: not implemented yet
  • โš ๏ธ: experimental and unstable

There are more APIs that are not recorded in the official documentation. Once all the above APIs are done, we would get on these undocumented APIs ASAP.

According to the official API documentation, there's a limit on the API that could only be called 3 times per sec. Otherwise, the request may be blocked by the cloudflare.

Installation

pip install pywmapi

The version of Python MUST >= 3.7 since dataclasses is used.

Guidance

package of pywmapi is structured as:

.
โ”œโ”€โ”€ auth
โ”œโ”€โ”€ common
โ”œโ”€โ”€ exceptions
โ”œโ”€โ”€ experimental
โ”‚   โ””โ”€โ”€ auctions
โ”œโ”€โ”€ items
โ”œโ”€โ”€ lang
โ”œโ”€โ”€ liches
โ”œโ”€โ”€ orders
โ”œโ”€โ”€ profile
โ”œโ”€โ”€ rivens
โ”œโ”€โ”€ statistics
โ””โ”€โ”€ utils.py
  • auth: authentication such as signin
  • experimental: experimental functionalities
    • auctions: auctions related
  • items: item related
  • liches lich related
  • orders: orders manipulation
  • profile: user profile manipulation
  • rivens: riven related
  • statistics: statistics of items

๐Ÿ’ช More functionalities is coming!

๐Ÿ—๏ธ Better documentation is under construction!

The param url_name of some functions is regarded as the unique name for each item. For instance, if I search for the item Chroma Prime Systems on warframe market, the url for this page become https://warframe.market/items/chroma_prime_systems. And the last part of this url string is exactly the url_name for this item, i.e. chroma_prime_systems!

Another way to get url_name for an item is through the items.list_items() function.

Examples

First, we import the package as:

import pywmapi as wm

To list all of the tradable items:

wm.items.list_items()

To get the info for any item with its url_name:

wm.items.get_item("chroma_prime_systems")

To get the orders of a specific item:

wm.items.get_orders("chroma_prime_systems")

To create order:

sess = wm.auth.signin("your_account", "your_password")
# new selling order item of "Flame Gland" for 1000 platinum, quantity 1, rank 0 and invisible
new_item = wm.orders.OrderNewItem(
    item_id="5be5f5a23ffcc7038857f119",
    order_type=wm.common.OrderType.sell,
    platinum=1000,
    quantity=1,
    rank=0,
    visible=False,
)
new_order = wm.orders.add_order(sess, new_item)

To get the statistics of historical prices of any item:

wm.statistics.get_statistic("chroma_prime_systems")

Signin & get current orders:

sess = wm.auth.signin("your_account", "your_password")
sell_orders, buy_orders = wm.orders.get_current_orders(sess)

To get all rivens templates:

wm.rivens.list_items()

Some of these function may have various optional params, such as platform, lang, include, etc.

More APIs and docs could be found in corresponding packages and docstrings.

Reference

Warframe market official API documentation

WFCD/market-api-spec

Public WM API

Changelog

See CHANGELOG.md.

Contributing

Check out CONTRIBUTE.md for more information.

Feel free to make any issue or PR! ๐Ÿ˜Š

Or contact me in game!

Donating

Any sort of donation in game would be appreciated.

Contact me in game:

/w AyajiLin Hi! ${Your words here}.

๐Ÿคฃ Relics or 5 platinums would be enough.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywmapi-1.2.3.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pywmapi-1.2.3-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file pywmapi-1.2.3.tar.gz.

File metadata

  • Download URL: pywmapi-1.2.3.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywmapi-1.2.3.tar.gz
Algorithm Hash digest
SHA256 519a0269898c00dbae6aa5e6dabd440aeaca5bba5a048831375f9aa60464ed9f
MD5 69869367396e21c7d4652b3e8fdb4444
BLAKE2b-256 fc95d0b1c77b544034dcd1d2f72583b2746a403ddd83fdef9fc6ad514a12ba46

See more details on using hashes here.

File details

Details for the file pywmapi-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: pywmapi-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pywmapi-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe3be2fae2fb70c8b193ded754eb701b8a36efcb29466bb03d2cb927c10bb7d
MD5 52065221a8e13d30b9d35407a10fff8b
BLAKE2b-256 7483a2aa3a65768c442802996f3e8ea198eaf93f20e76e2488a27e0dfc5fb91d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page