YellowChangerAPI
YellowChangerAPI is a Python library for interacting with the YellowChanger service API. The library allows you to get exchange rates, create trades, and get information about trades.
Installation
To install the library, use the following command:
pip install yellowchangerapi
Usage
Example of using the library:
from yellow_changer_api import YellowChanger
def main():
public_api_key = "your_public_api_key"
secret_api_key = "your_secret_api_key"
yellow_changer = YellowChanger(public_api_key, secret_api_key)
# Get all rates
rates = yellow_changer.all_rates()
print(rates)
# Get destinations list
destinations_list = yellow_changer.destinations_list()
print(destinations_list)
# Get rates in direction USDT
rates_in_direction_USDT = yellow_changer.rates_in_direction('USDT')
print(rates_in_direction_USDT)
# Create a trade
trade = yellow_changer.create_trade(
send_name='USDT',
get_name='USDT',
send_value=100,
send_network='TRC20',
get_network='ERC20',
get_creds='0x4c...'
)
trade_uniq_id = trade.get('uniq_id')
# Get trade information
trade_info = yellow_changer.get_info(trade_uniq_id)
print(trade_info)
if __name__ == '__main__':
main()
Methods
all_rates()
Gets all exchange rates.
Example:
rates = yellow_changer.all_rates()
print(rates)
destinations_list()
Gets the list of all destinations.
Example:
destinations = yellow_changer.destinations_list()
print(destinations)
rates_in_direction(direction: str)
Gets all exchange rates in a specific direction.
Parameters:
direction(str): The direction of the rate, for example, 'USDT'.
Example:
rates = yellow_changer.rates_in_direction('USDT')
print(rates)
get_info(uniq_id: str)
Gets information about a trade by the unique ID of the trade.
Parameters:
uniq_id(str): The unique ID of the trade.
Example:
info = yellow_changer.get_info('your_unique_id')
print(info)
create_trade(**kwargs)
Creates a new trade based on the provided parameters.
Example:
trade = yellow_changer.create_trade(
send_name='USDT',
get_name='USDT',
send_value=100,
send_network='TRC20',
get_network='ERC20',
get_creds='0x4c...'
)
print(trade)
Metadata
Release files for yellowchangerapi 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yellowchangerapi-1.0.4.tar.gz | 3.9 kB | Without provenance | Details for yellowchangerapi-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yellowchangerapi-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for yellowchangerapi-1.0.4-py3-none-any.whl |
Total release size: 8.4 kB
Release files / yellowchangerapi-1.0.4.tar.gz
| Download URL | yellowchangerapi-1.0.4.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
399dfcaa0bf5392f751cc81ba29871a81e52a5ebaa10e22172346ec88b2eebfe
|
|
BLAKE2b-256 checksum How to use checksums |
72b3fad4b557bd04d4757fc47eaec0c69e160939f0476d858ea43f3309a046b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Release files / yellowchangerapi-1.0.4-py3-none-any.whl
| Download URL | yellowchangerapi-1.0.4-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dbe8d1c59e9e13703ca62d828a4f0db2777e369bbe32e8d435c46060c0202226
|
|
BLAKE2b-256 checksum How to use checksums |
4e8690eadbc120614eb8c9256c1134e29ad25634c734dbab18d53e5ebefa7266
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.15
|
Security for yellowchangerapi 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.