Skip to main content

API client for BDO market

Project description

Contributors Forks Stargazers Issues project_license


Logo

bdomarket

API client for BDO market data

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This code is a simple and well-structured API client for BDO market data, built for convenience. It enables developers to access market information, price history, and shop data from Arsha.io in a standardized way.

(back to top)

Built With

Python

(back to top)

Getting Started

A Python API client for accessing the Arsha.io Black Desert Online Market API.

Easily retrieve market data, hotlist items, price history, bidding info, and more.

Prerequisites

Python installed on your system.

  • Python >= 3.8

Installation

pip install bdomarket

(back to top)

Usage

import bdomarket

market = bdomarket.Market(bdomarket.AvailableRegions.EU, bdomarket.AvailableApiVersions.V2, bdomarket.SupportedLanguages.English)

# Each function return ApiResponse obj - this can be used to acess information more easier
market.GetWorldMarketWaitList().content
market.GetWorldMarketWaitList().statuscode
market.GetWorldMarketWaitList().success
market.GetWorldMarketWaitList().message # this is kinda pointless, devs did not implement such functionality
iterable = market.GetWorldMarketWaitList().Deserialize() # Deserialize to a Python object.
for item in iterable:
    print(item)
market.GetWorldMarketWaitList().SaveToFile("responses/waitlist/get.json") # saving output to file
print(bdomarket.ConvertTimestamp(1745193600000)) # can be useful if you don't know how to convert Unix timestamps to human readable format. Note (Post)GetMarketPriceInfo return timestamps...

# WaitList
market.GetWorldMarketWaitList().SaveToFile("responses/waitlist/get.json")
market.PostGetWorldMarketWaitList().SaveToFile("responses/waitlist/post.json")
print(market.GetWorldMarketWaitList())
print(market.PostGetWorldMarketWaitList())

# HotList
market.GetWorldMarketHotList().SaveToFile("responses/hotlist/get.json")
market.PostGetWorldMarketHotList().SaveToFile("responses/hotlist/post.json")
print(market.GetWorldMarketHotList())
print(market.PostGetWorldMarketHotList())

# List
market.GetWorldMarketList("1", "1").SaveToFile("responses/list/get.json")
market.PostGetWorldMarketList("1", "1").SaveToFile("responses/list/post.json")
print(market.GetWorldMarketList("1", "1"))
print(market.PostGetWorldMarketList("1", "1"))


# SubList
market.GetWorldMarketSubList(["735008", "731109"]).SaveToFile("responses/sublist/get.json")
market.PostGetWorldMarketSubList(["735008", "731109"]).SaveToFile("responses/sublist/post.json")
print(market.GetWorldMarketSubList(["735008", "731109"]))
print(market.PostGetWorldMarketSubList(["735008", "731109"]))


# SearchList
market.GetWorldMarketSearchList(["735008", "731109"]).SaveToFile("responses/searchlist/get.json")
market.PostGetWorldMarketSearchList(["735008", "731109"]).SaveToFile("responses/searchlist/post.json")
print(market.GetWorldMarketSearchList(["735008", "731109"]))
print(market.PostGetWorldMarketSearchList(["735008", "731109"]))


# BiddingInfo
market.GetBiddingInfo(["735008", "731109"], ["19", "20"]).SaveToFile("responses/bidding/get.json")
market.PostGetBiddingInfo(["735008", "731109"], ["19", "20"]).SaveToFile("responses/bidding/post.json")
print(market.GetBiddingInfo(["735008", "731109"], ["19", "20"]))
print(market.PostGetBiddingInfo(["735008", "731109"], ["19", "20"]))


# PriceInfo
market.GetMarketPriceInfo(["735008", "731109"], ["19", "20"]).SaveToFile("responses/priceinfo/get.json")
market.PostGetMarketPriceInfo(["735008"], ["20"]).SaveToFile("responses/priceinfo/post.json")
print(market.GetMarketPriceInfo(["735008", "731109"], ["19", "20"]))
print(market.PostGetMarketPriceInfo(["735008"], ["20"]))


# PearItems
market.GetPearlItems().SaveToFile("responses/pearlitems/get.json")
market.PostGetPearlItems().SaveToFile("responses/pearlitems/post.json")
print(market.GetPearlItems())
print(market.PostGetPearlItems())


# Market
market.GetMarket().SaveToFile("responses/market/get.json")
market.PostGetMarket().SaveToFile("responses/market/post.json")
print(market.GetMarket())
print(market.PostGetMarket())

# Boss timer
bt = bdomarket.timers.Boss(bdomarket.timers.Server.EU)
bt.Scrape()
print(bt.GetTimerJSON())

(back to top)

Example:

market.GetBiddingInfo(["735008", "731109"], ["19", "20"]).SaveToFile("responses/bidding/get.json")

Outputs:

{
  "success": true,
  "statuscode": 200,
  "message": "No message provided",
  "content": [
    {
      "name": "Blackstar Shuriken",
      "id": 735008,
      "sid": 19,
      "orders": [
        {
          "price": 14500000000,
          "sellers": 1,
          "buyers": 0
        },
        {
          "price": 15500000000,
          "sellers": 1,
          "buyers": 0
        },
        {
          "price": 14900000000,
          "sellers": 4,
          "buyers": 0
        },
        {
          "price": 14700000000,
          "sellers": 0,
          "buyers": 0
        }
      ]
    },
    {
      "name": "Blackstar Sura Katana",
      "id": 731109,
      "sid": 20,
      "orders": [
        {
          "price": 72500000000,
          "sellers": 1,
          "buyers": 0
        },
        {
          "price": 73500000000,
          "sellers": 1,
          "buyers": 0
        },
        {
          "price": 73000000000,
          "sellers": 1,
          "buyers": 0
        },
        {
          "price": 70500000000,
          "sellers": 0,
          "buyers": 0
        }
      ]
    }
  ]
}

Top contributors:

contrib.rocks image

License

Distributed under the GNU General Public License v3.0.
See LICENSE for more information.

This project is copyleft: you may copy, distribute, and modify it under the terms of the GPL, but derivative works must also be open source under the same license.

Learn more about GPL-3.0 »

(back to top)

Contact

Project Link: https://github.com/Fizzor96/bdomarket

(back to top)

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

bdomarket-0.1.11.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

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

bdomarket-0.1.11-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

Details for the file bdomarket-0.1.11.tar.gz.

File metadata

  • Download URL: bdomarket-0.1.11.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bdomarket-0.1.11.tar.gz
Algorithm Hash digest
SHA256 0011f5046bb989ce9f7c4062a0488261ad0e0169a6d60962aaeef0cce7eebc8b
MD5 9f86c7a5cdb9d45c34e1d6b7713afb42
BLAKE2b-256 204d048761dbd486bc475339023857f16be996018a9ccff3648fa12445fe5932

See more details on using hashes here.

Provenance

The following attestation bundles were made for bdomarket-0.1.11.tar.gz:

Publisher: release.yml on Fizzor96/bdomarket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bdomarket-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: bdomarket-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 33.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for bdomarket-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 5b1ba0e1d28e5674d5b15c99703aad8572c941efc354fe005d67998410a2942b
MD5 a24df329db186a6485d49f549478ce45
BLAKE2b-256 931aef76dbc3504b72c7d3c25edbcb270c5ad0bb829b3a91494025bf1750c5ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for bdomarket-0.1.11-py3-none-any.whl:

Publisher: release.yml on Fizzor96/bdomarket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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