JSON HTTP API
Getting Started
Introduction
The SUWORLD Developer APIs are provided as a service and without warranty, so please use what you need and no more. We support POST requests and there is a rate limit of 5 calls per sec/IP.
API Summary
- To use the API service please create a Api-Key Token from within the Register API area which you can then use with all your api requests.
- Kindly refer API Key Rate Limit & Errors for expected returns. Please contact us if you would like to upgrade your API Plan.
API Key Rate Limit & Errors:
API Call
During the enforcement of the API key requirement, developers will expect the return errors listed, where an API key is not in use or exceeding the rate limit.
- The 5 calls per sec/IP rate limit is exceeded
- An API request with a blank API Key or the default "ApiKey"
- An API request with Invalid API Key
- API requests with Invalid API Key exceeding limit
Node
nodeStatus
Returns node status
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"nodeStatus"}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"nodeStatus"},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"nodeStatus"}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"nodeStatus"});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"nodeStatus"}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
getProtocolVersion
Returns node protocol version
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"getProtocolVersion"}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"getProtocolVersion"},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"getProtocolVersion"}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"getProtocolVersion"});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"getProtocolVersion"}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
Block
getBlock
Get block information
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"getBlock","params":{"block":8888}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"getBlock","params":{"block":8888}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"getBlock","params":{"block":8888}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"getBlock","params":{"block":8888}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"getBlock","params":{"block":8888}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
getBlcokCount
Get chain high in this node
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"getBlcokCount"}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"getBlcokCount"},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"getBlcokCount"}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"getBlcokCount"});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"getBlcokCount"}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
getBlcokTransactions
Get operations of specified block
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"getBlcokTransactions","params":{"block":8888,"max":300}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"getBlcokTransactions","params":{"block":8888,"max":300}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"getBlcokTransactions","params":{"block":8888,"max":300}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"getBlcokTransactions","params":{"block":8888,"max":300}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"getBlcokTransactions","params":{"block":8888,"max":300}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
Wallet
newWallet
Adds a new key to the Wallet
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"newWallet","params":{"passphrase":"password"}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"newWallet","params":{"passphrase":"password"}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"newWallet","params":{"passphrase":"password"}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"newWallet","params":{"passphrase":"password"}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"newWallet","params":{"passphrase":"password"}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
getWalletInfo
Get infomation of specified wallet
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"getWalletInfo","params":{"wallet":"SWZNDY8AeRH6G75HDmgyLRo9ghXsTSQxAvmSFH93pGMyp45a"}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"getWalletInfo","params":{"wallet":"SWZNDY8AeRH6G75HDmgyLRo9ghXsTSQxAvmSFH93pGMyp45a"}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"getWalletInfo","params":{"wallet":"SWZNDY8AeRH6G75HDmgyLRo9ghXsTSQxAvmSFH93pGMyp45a"}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"getWalletInfo","params":{"wallet":"SWZNDY8AeRH6G75HDmgyLRo9ghXsTSQxAvmSFH93pGMyp45a"}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"getWalletInfo","params":{"wallet":"SWZNDY8AeRH6G75HDmgyLRo9ghXsTSQxAvmSFH93pGMyp45a"}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
Transaction
sendTo
Executes a transaction
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"sendTo","params":{"sender":"SWHgyqvvaiShRfvKbTw5jD5Kz7M1G6dQbnvoUxVKFvDnZtwi","receiver":"SWEk7bHfhZFg5GoZgftb18J8SKkDQbBpPA7g36dbPSambfAY","amount":1000,"passphrase":"password"}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"sendTo","params":{"sender":"SWHgyqvvaiShRfvKbTw5jD5Kz7M1G6dQbnvoUxVKFvDnZtwi","receiver":"SWEk7bHfhZFg5GoZgftb18J8SKkDQbBpPA7g36dbPSambfAY","amount":1000,"passphrase":"password"}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"sendTo","params":{"sender":"SWHgyqvvaiShRfvKbTw5jD5Kz7M1G6dQbnvoUxVKFvDnZtwi","receiver":"SWEk7bHfhZFg5GoZgftb18J8SKkDQbBpPA7g36dbPSambfAY","amount":1000,"passphrase":"password"}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"sendTo","params":{"sender":"SWHgyqvvaiShRfvKbTw5jD5Kz7M1G6dQbnvoUxVKFvDnZtwi","receiver":"SWEk7bHfhZFg5GoZgftb18J8SKkDQbBpPA7g36dbPSambfAY","amount":1000,"passphrase":"password"}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"sendTo","params":{"sender":"SWHgyqvvaiShRfvKbTw5jD5Kz7M1G6dQbnvoUxVKFvDnZtwi","receiver":"SWEk7bHfhZFg5GoZgftb18J8SKkDQbBpPA7g36dbPSambfAY","amount":1000,"passphrase":"password"}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
getPendingTransaction
Get pendings transaction to be included in the chain
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"getPendingTransaction","params":{"max":100}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"getPendingTransaction","params":{"max":100}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"getPendingTransaction","params":{"max":100}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"getPendingTransaction","params":{"max":100}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"getPendingTransaction","params":{"max":100}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
findWalletTransaction
Get transactions made to an wallet
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"findWalletTransaction","params":{"wallet":"SWG2LHXBHUr17SYoUpCYCvB9eXzschJbHzM4XPVNnMNvxpj7","start":8888,"max":100}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"findWalletTransaction","params":{"wallet":"SWG2LHXBHUr17SYoUpCYCvB9eXzschJbHzM4XPVNnMNvxpj7","start":8888,"max":100}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"findWalletTransaction","params":{"wallet":"SWG2LHXBHUr17SYoUpCYCvB9eXzschJbHzM4XPVNnMNvxpj7","start":8888,"max":100}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"findWalletTransaction","params":{"wallet":"SWG2LHXBHUr17SYoUpCYCvB9eXzschJbHzM4XPVNnMNvxpj7","start":8888,"max":100}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"findWalletTransaction","params":{"wallet":"SWG2LHXBHUr17SYoUpCYCvB9eXzschJbHzM4XPVNnMNvxpj7","start":8888,"max":100}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
getFee
Transaction fee calculated by chain
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"getFee"}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"getFee"},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"getFee"}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"getFee"});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"getFee"}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
Contract
createContract
Executes create contract over an wallet
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"createContract","params":{"wallet":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"password","business":"true","name":"TESTCOIN","symbol":"TCN","totalAmount":"100000","decimal":"18","summary":"TEST COIN IS TEST"}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"createContract","params":{"wallet":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"password","business":"true","name":"TESTCOIN","symbol":"TCN","totalAmount":"100000","decimal":"18","summary":"TEST COIN IS TEST"}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"createContract","params":{"wallet":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"password","business":"true","name":"TESTCOIN","symbol":"TCN","totalAmount":"100000","decimal":"18","summary":"TEST COIN IS TEST"}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"createContract","params":{"wallet":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"password","business":"true","name":"TESTCOIN","symbol":"TCN","totalAmount":"100000","decimal":"18","summary":"TEST COIN IS TEST"}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"createContract","params":{"wallet":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"password","business":"true","name":"TESTCOIN","symbol":"TCN","totalAmount":"100000","decimal":"18","summary":"TEST COIN IS TEST"}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
sendContract
Executes a contract transaction
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"sendContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","receiver":"SWogTJtxnqQD3emG57S759CzAKnxDTGwgeSGoUbfqRsKaYQL","amount":"100","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","passphrase":"password","payload":"hi"}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"sendContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","receiver":"SWogTJtxnqQD3emG57S759CzAKnxDTGwgeSGoUbfqRsKaYQL","amount":"100","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","passphrase":"password","payload":"hi"}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"sendContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","receiver":"SWogTJtxnqQD3emG57S759CzAKnxDTGwgeSGoUbfqRsKaYQL","amount":"100","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","passphrase":"password","payload":"hi"}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"sendContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","receiver":"SWogTJtxnqQD3emG57S759CzAKnxDTGwgeSGoUbfqRsKaYQL","amount":"100","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","passphrase":"password","payload":"hi"}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"sendContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","receiver":"SWogTJtxnqQD3emG57S759CzAKnxDTGwgeSGoUbfqRsKaYQL","amount":"100","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","passphrase":"password","payload":"hi"}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
adminContract
Executes a contract admin transaction
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"adminContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"eoqkrskwktjdrhd","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","method":"transferEnabled","select":"false"}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"adminContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"eoqkrskwktjdrhd","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","method":"transferEnabled","select":"false"}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"adminContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"eoqkrskwktjdrhd","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","method":"transferEnabled","select":"false"}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"adminContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"eoqkrskwktjdrhd","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","method":"transferEnabled","select":"false"}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"adminContract","params":{"sender":"SWGT2A8gY37RkBedzrX1rwi61H8ZBECSx52r1CmRdeGDjdyS","passphrase":"eoqkrskwktjdrhd","contract":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz","method":"transferEnabled","select":"false"}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
infoContract
Returns creation contract infomation
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"infoContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"infoContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"infoContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"infoContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"infoContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
holderContract
Returns contract holder infomation
curl --request POST \
--url https://devapi.suworld.net \
--header 'content-type: application/json' \
--data '{"api":"YourApiKey","method":"holderContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}}'
var request = require("request");
var options = {
method: 'POST',
url: 'https://devapi.suworld.net',
headers: {'content-type': 'application/json'},
body: {"api":"YourApiKey","method":"holderContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://devapi.suworld.net")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{"api":"YourApiKey","method":"holderContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}}"
response = http.request(request)
puts response.read_body
var data = JSON.stringify({
"api":"YourApiKey","method":"holderContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}});
var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://devapi.suworld.net");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
import requests
url = "https://devapi.suworld.net"
payload = "{"api":"YourApiKey","method":"holderContract","params":{"wallet":"SW4R9entgziXv6hLeJBSGLJLLj9o6DwtBxVATui3vNBBuumz"}}"
headers = {'content-type': 'application/json'}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)