A package for accessing Singapore bullion retailers API
Project description
Singapore Bullion Retailers API
An open-source Python library for accessing Singapore bullion retailers API
Designed for retail investors and businesses, this package streamlines the process of integrating with the bullion marketplace by abstracting complex API calls and providing intuitive functions to manage investments in gold, silver, and other precious metals.
BullionStar Singapore https://www.bullionstar.com/developer/docs/api/
# import the module
from bullion import BullionStar
BullionStar Object
| locationId | Country |
|---|---|
| 1 | Singapore |
| 3 | New Zealand |
# Creates a http session
bullionstar_client = BullionStar(cuurency='SGD', locationId=1)
Authentication API
- Initialize Authentication
authToken, salt = bullionstar_client.initialize('example@example.com')
- Perform Authentication
hashedPassword = BullionStar.hashPassword(password)
encryptedPassword = BullionStar.encryptPassword(salt, hashedPassword)
authenticate_response = bullionstar_client.authenticate(authToken, encryptedPassword)
- Perform Two-factor Authentication
- Resend Two-factor Authentication Code
- Invalidate Access Token
invalidate_response = bullionstar_client.invalidate()
Shopping Cart API
- Refresh Shopping Cart
- Add to Shopping Cart
| ID | Item |
|---|---|
| 480 | 1 Gram of Gold - Bullion Savings Program (BSP) |
| 481 | 1 Gram of Silver - Bullion Savings Program (BSP) |
IMPORTANT!!! Product ID are different across location
cart_response = bullionstar_client.add_to_shopping_cart(productId=481, quantity=32)
- Update Shopping Cart (unstable)
- Remove from Shopping Cart (unstable)
- Load All Shopping Carts
Buy Checkout API (in-development)
- Initialize Order
- Update Order
- Confirm Order
- Confirm Order and Create Account
Silver Bullion Singapore Stargrams (development on hold)
# import the module
from bullion import StarGrams
StarGrams Object
# Creates a http session
stargrams_client = StarGrams()
- Login
login_response = stargrams_client.login('example@example.com', 'some_password')
- 2FA
- User
Silver Bullion Singapore (development on hold)
- Login function
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file singapore_bullion_retailers-0.0.6.tar.gz.
File metadata
- Download URL: singapore_bullion_retailers-0.0.6.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4d433547ce9cfca42a02b428bc0f3bd03a8e6808dff12aea85b6012216815e0
|
|
| MD5 |
e0a3eda287a736b86fbddeb37f1f49eb
|
|
| BLAKE2b-256 |
6378ba507ee6d5610d065536fabfb7db9fe96c0413c25d837683cc592aefbe45
|
File details
Details for the file singapore_bullion_retailers-0.0.6-py3-none-any.whl.
File metadata
- Download URL: singapore_bullion_retailers-0.0.6-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73d4c3da393488bd86040481364235a04723c0dde5efd302851bfbcba92b3e87
|
|
| MD5 |
3c5b75f78f874b55f4cf0881e9af9338
|
|
| BLAKE2b-256 |
9d3ee459050af2b7f008bfdb177d4e3d03dd6a5343dc86ab3f7fe167c63c132b
|