Skip to content

Instantly share code, notes, and snippets.

@0x1bit011
Created December 25, 2024 18:59
Show Gist options
  • Save 0x1bit011/0957d4d0d2b5af7b551218a3cc67fd43 to your computer and use it in GitHub Desktop.
Save 0x1bit011/0957d4d0d2b5af7b551218a3cc67fd43 to your computer and use it in GitHub Desktop.
import http.client
conn = http.client.HTTPConnection("https://rest.cryptoapis.io")
payload = "{
\"context\": \"yourExampleString\",
\"data\": {
\"item\": {
\"callbackSecretKey\": \"yourSecretString\",
\"callbackUrl\": \"https://example.com\",
\"confirmationsCount\": \"3\",
\"feePriority\": \"standard\",
\"minimumTransferAmount\": \"0.02\",
\"toAddress\": \"mzYijhgmzZrmuB7wBDazRKirnChKyow4M3\"
}
}
}"
querystring = {"context":"yourExampleString"}
headers = {
'Content-Type': "application/json",
'x-api-key': ""
}
conn.request("POST", "blockchain-automations,bitcoin,testnet,coins-forwarding,automations",payload, headers=headers , params=querystring )
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment