Python SDK (API wrapper) for SplitNOW, the multi-wallet instant crypto exchange. 🪼
pip install splitnowYou'll need to create a SplitNOW API key if you don't have one already:
- Create a SplitNOW account at https://splitnow.io/auth/register
- Head to the API keys page on your account dashboard at https://splitnow.io/account/api-keys
- Copy your account's API key and store it in a safe place.
This example demonstrates splitting 10 SOL evenly across 2 wallets through Binance & Bybit:
# First, import the SplitNOW SDK into your file:
from splitnow import (SplitNow, AssetId, NetworkId, WalletDistribution)
SPLITNOW_API_KEY = "replace_me" # Get a free API key at: https://splitnow.io/auth/register
# Next, initialize the SplitNOW SDK with your API key:
client = SplitNow(api_key=SPLITNOW_API_KEY)
# (Optional) Check health
health = client.get_health()
print(f"API Status: {health}")
# Step 1/3: Creating and fetching a quote
quote_data = client.create_and_fetch_quote(
from_amount=10.0,
from_asset_id=AssetId.SOL,
from_network_id=NetworkId.SOLANA,
to_asset_id=AssetId.SOL,
to_network_id=NetworkId.SOLANA,
wait_time=1.0
)
print(f"Quote ID: {quote_data.quote_id}")
print(f"Available rates: {len(quote_data.rates)}")
print("Top 5 rates (with 1% slippage buffer):")
# (Optional) Sort by rate descending
sorted_rates = sorted(quote_data.rates, key=lambda x: x.exchange_rate, reverse=True)
for rate in sorted_rates[:5]:
if rate.exchange_rate > 0:
print(f" - {rate.exchange_id}: {rate.exchange_rate:.6f}")
# Step 2/3: Creating and fetching an order
best_rate = sorted_rates[0] if sorted_rates else None
if best_rate and best_rate.exchange_rate > 0:
order_data = client.create_and_fetch_order(
quote_id=quote_data.quote_id,
from_amount=10.0,
from_asset_id=AssetId.SOL,
from_network_id=NetworkId.SOLANA,
wallet_distributions=[
WalletDistribution(
to_address="7ingPqZUYmuso5HakTLgoXjMpETpbZYzxeQBJChGrQn5",
to_pct_bips=5000, # 50%
to_asset_id=AssetId.SOL,
to_network_id=NetworkId.SOLANA,
to_exchanger_id="binance"
),
WalletDistribution(
to_address="92CzWZt7fD5ffhwkRNBKHxqHahVTPeWedd5UYmdmHjMw",
to_pct_bips=5000, # 50%
to_asset_id=AssetId.SOL,
to_network_id=NetworkId.SOLANA,
to_exchanger_id="bybit"
)
],
wait_time=1.0
)
print(f"Order ID: {order_data.order_id}")
print(f"Deposit Address: {order_data.deposit_address}")
print(f"Deposit Amount: {order_data.deposit_amount}")
# The unique deposit address and amount to send to start the order
deposit_address = order_data.deposit_address
deposit_amount = order_data.deposit_amount
order_id_for_status = order_data.order_id
else:
print("Skipped (no valid rates)")
order_id_for_status = None
# Step 3/3: Fetching an order status
if order_id_for_status:
order_status = client.get_order_status(order_id_for_status)
print(f"Order Status: {order_status.order_status}")
print(f"Status Text: {order_status.order_status_text}")To ensure a seamless SplitNOW API integration for your use case, you must first understand the 3-step flow when using the SplitNOW API.
Below is a short explainer of each step so that you can best fit each step into your own software & workflows.
quote_data = client.create_and_fetch_quote(
from_amount=10.0,
from_asset_id=AssetId.SOL,
from_network_id=NetworkId.SOLANA,
to_asset_id=AssetId.SOL,
to_network_id=NetworkId.SOLANA
)- Save
quote_data.quote_idbecause you need this value to create your order in the next step. - You'll also probably want to do something such as filter through
quote_data.ratesto see which exchanges are available and at what rate. - If the
exchange_ratekey of a rate object in thequote_data.ratesarray is0, the pair might not be supported on that exchange. - You can pick any exchange no matter what, though. Our systems fall back to the next best rate if your selection is unavailable!
order_data = client.create_and_fetch_order(
quote_id=quote_data.quote_id,
from_amount=10.0,
from_asset_id=AssetId.SOL,
from_network_id=NetworkId.SOLANA,
wallet_distributions=[...]
)- Remember to pass in the
quote_idfrom the previous step! - The
order_dataobject contains important information you'll need for initiating the order:order_data.deposit_address&order_data.deposit_amount. - Once you've sent the deposit, we take care of everything else automatically!
- Save
order_data.order_idso you can check the status of your order anytime.
order_status = client.get_order_status(order_id)- Remember to pass in the
order_idfrom the previous step! - Your 6-digit order ID is returned as
order_status.order_id. - You'll probably want to do something with
order_status.order_statussuch as update your app's client or trigger a notification once the order status changes. - If you want a human-readable order status such as for your UI, use
order_status.order_status_text. - Once
order_status.order_statusiscompleted, it's all done and the wallets are funded as requested! Enjoy!
This Python SDK includes 10 functions that wrap around the SplitNOW API to help you get up and running with creating quotes & orders quickly, no matter your use case:
def get_health() -> bool- Checks whether the SplitNOW API is healthy.
- Returns: A
boolindicating API health status.
API Reference: GET /health/
def get_assets() -> List[Asset]- Gets a list of available asset IDs and network IDs.
- Returns: A
List[Asset]array.
💡 Pro Tip: When creating quotes & orders, the asset_id key of each Asset can be used for from_asset_id & to_asset_id.
💡 Pro Tip: When creating quotes & orders, the network_id key of a corresponding Asset can be used for from_network_id & to_network_id.
API Reference: GET /assets/
def get_asset_prices() -> Dict[str, Optional[float]]- Gets the current USD price of each available asset by ID.
- Returns: A
Dict[str, Optional[float]]where each key is an asset ID and each value is its price.
API Reference: GET /assets/prices/
def get_asset_deposit_limits() -> List[AssetLimit]- Gets the minimum and maximum deposit (if any) for each available asset.
- Returns: A
List[AssetLimit]array.
API Reference: GET /assets/limits/
def get_exchangers() -> List[Exchanger]- Get a list of available exchanger IDs.
- Returns: A
List[Exchanger]array.
💡 Pro Tip: When creating quotes & orders, the id key of each Exchanger can be used for to_exchanger_id.
API Reference: GET /exchangers/
def create_and_fetch_quote(
from_amount: float,
from_asset_id: Union[str, AssetId],
from_network_id: Union[str, NetworkId],
to_asset_id: Union[str, AssetId],
to_network_id: Union[str, NetworkId],
wait_time: float = 1.0
) -> QuoteData- Creates and fetches a quote.
- Parameters:
from_amount: A numerical amount of tokens to split.from_asset_id: The input asset ID returned fromget_assets.from_network_id: A corresponding input network ID returned fromget_assets.to_asset_id: The output asset ID returned fromget_assets.to_network_id: A corresponding output network ID returned fromget_assets.wait_time: Time to wait (in seconds) after creating the quote before fetching it. Default is 1.0.
- Returns: A
QuoteDataobject.
API Reference: POST /quotes/, GET /quotes/{id}
def create_and_fetch_order(
quote_id: str,
from_amount: float,
from_asset_id: Union[str, AssetId],
from_network_id: Union[str, NetworkId],
wallet_distributions: List[WalletDistribution],
wait_time: float = 1.0
) -> OrderData- Creates and fetches an order.
- Parameters:
quote_id: A quote ID returned fromcreate_and_fetch_quote.from_amount: A numerical amount of tokens to split.from_asset_id: The input asset ID returned fromget_assets.from_network_id: A corresponding input network ID returned fromget_assets.wallet_distributions: AList[WalletDistribution]containing recipient wallets and distribution preferences.wait_time: Time to wait (in seconds) after creating the order before fetching it. Default is 1.0.
- Returns: An
OrderDataobject.
API Reference: POST /orders/, GET /orders/{id}
def get_quote(quote_id: str) -> Quote- Fetches a quote by its ID.
- Parameters:
quote_id: The quote ID to fetch.
- Returns: A
Quoteobject.
API Reference: GET /quotes/{id}
def get_order(order_id: str) -> Order- Fetches an order by its ID.
- Parameters:
order_id: The order ID to fetch.
- Returns: An
Orderobject.
API Reference: GET /orders/{id}
def get_order_status(order_id: str) -> OrderStatusData- Fetches the status of an order by its ID.
- Parameters:
order_id: The order ID to fetch.
- Returns: An
OrderStatusDataobject.
API Reference: GET /orders/{id}
The default rate-limit of each API key is 60 requests per minute.
Don't hesitate to contact SplitNOW if you need more. We scale to meet any demand instantly!
Never expose your SplitNOW API key to clients! If you think your API key may have been accidentally leaked, please contact support right away so that we can get you set up with a fresh one.
Our API services are not available to users in the Restricted Regions, directly or indirectly, in accordance with our Terms of Service.
- Official API docs: https://splitnow.io/api/docs
- Free 24/7 email support: [email protected]
- Free community support: SplitNOW API Developers Chat
Unlicensed (Whitelabelled)
More information: https://unlicense.org
© 2025 SplitOTC, Ltd.