POST
https://rest.cryptoapis.io/blockchain-tools/ethereum/ropsten/gas-limit/contract?context=yourExampleString
Headers
Content-Type: application/json
X-API-Key: my-api-key
Request Body
{
"context": "yourExampleString",
"data": {
"item": {
"amount": "0.12",
"contract": "0x092de782a7e1e0a92991ad829a0a33aef3c7545e",
"contractType": "ERC-20",
"recipient": "0xc065b539490f81b6c297c37b1925c3be2f190738",
"sender": "0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5"
}
}
}
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{
\"context\": \"yourExampleString\",
\"data\": {
\"item\": {
\"amount\": \"0.12\",
\"contract\": \"0x092de782a7e1e0a92991ad829a0a33aef3c7545e\",
\"contractType\": \"ERC-20\",
\"recipient\": \"0xc065b539490f81b6c297c37b1925c3be2f190738\",
\"sender\": \"0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5\"
}
}
}");
Request request = new Request.Builder()
.url("https://rest.cryptoapis.io/blockchain-tools/ethereum/ropsten/gas-limit/contract?context=yourExampleString")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("X-API-Key", "my-api-key")
.build();
Response response = client.newCall(request).execute();
var client = new RestClient("https://rest.cryptoapis.io/blockchain-tools/ethereum/ropsten/gas-limit/contract?context=yourExampleString");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader(""X-API-Key", "my-api-key");
request.AddParameter("application/json", "{
\"context\": \"yourExampleString\",
\"data\": {
\"item\": {
\"amount\": \"0.12\",
\"contract\": \"0x092de782a7e1e0a92991ad829a0a33aef3c7545e\",
\"contractType\": \"ERC-20\",
\"recipient\": \"0xc065b539490f81b6c297c37b1925c3be2f190738\",
\"sender\": \"0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5\"
}
}
}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
$request = new HttpRequest();
$request->setUrl('https://rest.cryptoapis.io/blockchain-tools/ethereum/ropsten/gas-limit/contract?context=yourExampleString');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Content-Type' => 'application/json',
'X-API-Key' => 'my-api-key'
));
$request->setBody('{
\"context\": \"yourExampleString\",
\"data\": {
\"item\": {
\"amount\": \"0.12\",
\"contract\": \"0x092de782a7e1e0a92991ad829a0a33aef3c7545e\",
\"contractType\": \"ERC-20\",
\"recipient\": \"0xc065b539490f81b6c297c37b1925c3be2f190738\",
\"sender\": \"0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5\"
}
}
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
import http.client
conn = http.client.HTTPConnection("https://rest.cryptoapis.io")
payload = "{
\"context\": \"yourExampleString\",
\"data\": {
\"item\": {
\"amount\": \"0.12\",
\"contract\": \"0x092de782a7e1e0a92991ad829a0a33aef3c7545e\",
\"contractType\": \"ERC-20\",
\"recipient\": \"0xc065b539490f81b6c297c37b1925c3be2f190738\",
\"sender\": \"0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5\"
}
}
}"
querystring = {"context":"yourExampleString"}
headers = {
'Content-Type': "application/json",
'X-API-Key': "my-api-key"
}
conn.request("POST", "blockchain-tools,ethereum,ropsten,gas-limit,contract",payload, headers=headers , params=querystring )
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
}
require 'uri'
require 'net/http'
url = URI("https://rest.cryptoapis.io/blockchain-tools/ethereum/ropsten/gas-limit/contract?context=yourExampleString")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["X-API-Key"] = 'my-api-key'
request.body = "{
\"context\": \"yourExampleString\",
\"data\": {
\"item\": {
\"amount\": \"0.12\",
\"contract\": \"0x092de782a7e1e0a92991ad829a0a33aef3c7545e\",
\"contractType\": \"ERC-20\",
\"recipient\": \"0xc065b539490f81b6c297c37b1925c3be2f190738\",
\"sender\": \"0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5\"
}
}
}"
response = http.request(request)
puts response.read_body
var https = require("https");
var options = {
"method": "POST",
"hostname": "rest.cryptoapis.io",
"path": "/v2/blockchain-tools/ethereum/ropsten/gas-limit/contract",
"qs": {"context":"yourExampleString"},
"headers": {
"Content-Type": "application/json",
"X-API-Key": "my-api-key"
}
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
"context": "yourExampleString",
"data": {
"item": {
"amount": "0.12",
"contract": "0x092de782a7e1e0a92991ad829a0a33aef3c7545e",
"contractType": "ERC-20",
"recipient": "0xc065b539490f81b6c297c37b1925c3be2f190738",
"sender": "0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5"
}
}
}));
req.end();
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://rest.cryptoapis.io/blockchain-tools/ethereum/ropsten/gas-limit/contract?context=yourExampleString"
payload := strings.NewReader("{
\"context\": \"yourExampleString\",
\"data\": {
\"item\": {
\"amount\": \"0.12\",
\"contract\": \"0x092de782a7e1e0a92991ad829a0a33aef3c7545e\",
\"contractType\": \"ERC-20\",
\"recipient\": \"0xc065b539490f81b6c297c37b1925c3be2f190738\",
\"sender\": \"0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5\"
}
}
}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("X-API-Key", "my-api-key")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}