βš™οΈEPM API Documentation

Developers looking to integrate EPM into their applications will find comprehensive API documentation on this page. It provides detailed information on EPM's APIs, endpoints, data structures, and authentication methods, enabling smooth integration into custom projects.

import requests

# Set up the API endpoint URL
api_url = "https://api.epm.io/mixer/transactions"

# Define the input parameters for the transaction mixer
input_address = "0x123456789abcdef"  # The input address of the transaction
output_address = "0x987654321fedcba"  # The output address for the mixed transaction
amount = 0.5  # The amount to be mixed (in ETH or ERC20 tokens)

# Create a JSON payload with the input parameters
payload = {
    "input_address": input_address,
    "output_address": output_address,
    "amount": amount
}

# Make a POST request to the API endpoint
response = requests.post(api_url, json=payload)

# Check the response status code
if response.status_code == 200:
    # Transaction mixer request successful
    mixer_transaction = response.json()
    mixer_transaction_id = mixer_transaction["transaction_id"]
    print("Transaction successfully mixed. Transaction ID:", mixer_transaction_id)
else:
    # Transaction mixer request failed
    print("Error:", response.text)

Last updated