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.12.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.12-py3-none-any.whl (33.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bdomarket-0.1.12.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.12.tar.gz
Algorithm Hash digest
SHA256 75a0af89136c2ad7bef8ce43c7ea80910ed46c3f7b783ff82eeb1679c0d486d1
MD5 12dbe1f6755cb8ea73fab355c06ea2e4
BLAKE2b-256 a766b1faf3083ea7beb1b0f6553b88e06cb81ec15fe398af69b8b0347303f726

See more details on using hashes here.

Provenance

The following attestation bundles were made for bdomarket-0.1.12.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.12-py3-none-any.whl.

File metadata

  • Download URL: bdomarket-0.1.12-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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8e168a405d740a6ccf8eba9b9fe9434168f286b521b711cb15a24632a816803b
MD5 39b0a76a872a4ff261a3d4c9fc1d1464
BLAKE2b-256 ee69705880ab826ead56d2ad037eb87c616b4e53714f68fb506d27aa60116e95

See more details on using hashes here.

Provenance

The following attestation bundles were made for bdomarket-0.1.12-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