A P2P exnode SDK
Project description
from p2p_exnode_sdk import *
if __name__ == "__main__":
request = GetActiveOffersParams(
fiat="RUB", # RUB or KZT or UZS or TJS
crypto="USDTTRC",
amount="",
banks="SBERRUB,TCSBRUB,RFBRUB,SBPRUB,INTERBRUB,VTBRUB,OPNBRUB,MTSBRUB,ACRUB,RSHBRUB,GPBRUB,POSTBRUB,SOVKRUB,MKBRUB,YMRUB,PHONERUB,CASHRUB",
type="buy",
page=1,
limit=100,
sort="rate_asc"
)
response = get_active_offers(request)
interesting_user = None
interesting_offer = None
for info in response.info:
offer = info.offer
user = info.user
if user.nickname == "some_nickname":
interesting_offer = offer
interesting_user = user
print(f"interesting offer found: {offer}")
print(f"interesting user found: {user}")
break
if interesting_offer is None:
print("interesting offer not found")
exit(0)
request = PostSignInRequest(
email="your_email",
password="your_password"
)
response = post_sign_in(request)
access = response.data.access
refresh = response.data.refresh
response = get_via_offer(interesting_offer.internal_id, access, refresh)
interesting_data = None
for data in response.data:
# if data.tech == "SBERRUB":
# interesting_data = data
# print(f"interesting data found: {data}")
# break
interesting_data = data
print(f"interesting data found: {data}")
break
if interesting_data is None:
print("interesting data not found")
exit(0)
request = PostOrdersInitRequest(
internal_id=interesting_offer.internal_id,
taker="your_nickname",
maker=interesting_user.nickname,
amount_from=120,
amount_to=1,
crypto="USDTTRC",
fiat="SBERRUB",
req_id=interesting_data.id,
address=""
)
response = post_orders_init(request, access, refresh)
print(f"awaiting payment")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
p2p_exnode_sdk-0.0.2.tar.gz
(3.2 kB
view details)
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 p2p_exnode_sdk-0.0.2.tar.gz.
File metadata
- Download URL: p2p_exnode_sdk-0.0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecd5a83e67cea4daea746d5c3de1aea0e04de9b80240b3ec1f4007405048b6ba
|
|
| MD5 |
8c93733695940a4090586e1a675ed300
|
|
| BLAKE2b-256 |
accbbca90e2e30456717ba2a21822714dd2943a1437807d533af57d9cfe80413
|
File details
Details for the file p2p_exnode_sdk-0.0.2-py3-none-any.whl.
File metadata
- Download URL: p2p_exnode_sdk-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e60cf92eaddbdf633ca6bbd7d859084651881f68f328742024fdf586ae1faa81
|
|
| MD5 |
e9895d0fcd96f2e285275087ef51f856
|
|
| BLAKE2b-256 |
113688da4d19207bc22c5ae301737fa22beb4fb9bb508738acb16d179c91cff1
|