Please suggest me? Which api should be the better option and is ethereum does not provide any api ? or we only need to access third party api?
2 Answers
If you run a node (e.g. Geth or Parity) then you are able to expose a lot of functionality to yourself / your code via JSON RPC or the IPC interface.
Is there any api for creating the wallet
You can find the answer to creating a new account via JSON RPC, and what you should be wary of when doing so, in other questions such as this one.
Is there any api to transfer the ETH coin to wallet to wallet?
You can transfer Ether using the eth.sendTransaction function of the RPC interface / API e.g.
var sender = eth.accounts[0];
var receiver = eth.accounts[1];
var amount = web3.toWei(0.1, "ether");
eth.sendTransaction({from:sender, to:receiver, value: amount})
If you are not running your own node and still wish to use Ethereum, and other supported tokens use bloopi.
Bloopi supports a number of things with ruby and has a RESTFUL interface if you wish to not use ruby:
Install:
gem install bloopi
Auth:
require 'bloopi'
Bloopi::API::Auth.new(client_id='', client_secret='').get_access_token
New wallet
args = {password:'[hidden]'}
ether_wallet = Bloopi::API::Ether.new_wallet(args)
Ether balance
args = {"address":"0xad96B1072E60f6279F628E7512242F9b1A83127F"}
ether_balance = Bloopi::API::Ether.balance(args)
Send Ether
Bloopi::API::Ether.transfer({:to_address=>"0xE4E3A170843C6fdF2D480592D20eC27985Bc05Dd", :from_address=>"0x7e3513840f6936efe9cc96c279917af6e3be682b", :password=>"[hidden]", :quantity=>0.0001})
Exchange Ether for OmiseGo
Bloopi::API::Ether.exchange({:deposit_address=>"0x00c02245d47e1EE134B67C8a4e035C0A063fce2D", :from_address=>"0xdaa0dcc41d89e060e619cafe0c09e6a637b0f8ac", :password=>"[hidden]", :quantity=>0.05215999999999999})
OmiseGo balance
args = {wallet_address:""}
Bloopi::API::OmiseGo.balance(args)
Send OmiseGo
args = {to_address:"", from_address:"", password:"", quantity:0.001}
Bloopi::API::OmiseGo.transfer(args)
ERC20 token balance
args = {wallet_address:"", contract_address:""}
Bloopi::API::Token.balance(args)
Send ERC20 token
args = {to_address:"", from_address:"", password:"", quantity:0.001, contract_address:""}
Bloopi::API::Token.transfer(args)