Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Endpoints.md #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/Endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ are the ones listed below.
- `{ ok, list: [ { _id, created, user, active, type, amount, remainingAmount, resourceType, price, totalAmount, roomName } ] }`
- `resourceType` is one of the RESOURCE_* constants.

- `https://screeps.com/api/game/market/stats?resourceType=Z`
- `{ ok, stats: [ { _id, resourceType, date, transactions, volume, avgPrice, stddevPrice } ] }`
- `resourceType` is one of the RESOURCE_* constants.

- `https://screeps.com/api/user/money-history`
- `{"ok":1,"page":0,"list":[ { _id, date, tick, user, type, balance, change, market: {} } ] }`
- `page` used for pagination.
Expand Down
3 changes: 3 additions & 0 deletions screepsapi/screepsapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def my_orders(self):
def market_order_by_type(self, resourceType):
return self.get('game/market/orders', resourceType=resourceType)

def market_stats_by_type(self, resourceType):
return self.get('game/market/stats', resourceType=resourceType)

def market_history(self):
return self.get('user/money-history')

Expand Down