June 24, 2017, 01:14:08 am

Author Topic: Official Coinprism Beta API  (Read 2038 times)

Coinprism

  • Admin
  • Administrator
  • Jr. Member
  • *****
  • Posts: 62
    • View Profile
    • Coinprism
Official Coinprism Beta API
« on: August 02, 2014, 10:00:49 pm »
We have now released a Coinprism Beta API.

You can:
  • Get the balance of an address in Bitcoin and Colored Coins
  • Get details about a Bitcoin or Colored Coin transaction
  • Issue Colored Coins
  • Send Colored Coins
  • Send Bitcoins to one or more addresses

Here is an example on how to query an address:
https://api.coinprism.com/v1/addresses/1BXVXP82f7x9YWdWuCaCYwad8ZoYayyRYt
and here is an example how to query a transaction:
https://api.coinprism.com/v1/transactions/eba760a81b177051b0520418b4e10596955adb98196c15367a2467ab66a19b5c

Full documentation here: http://docs.coinprism.apiary.io/

Please let us know if you have any feedback!

hodlr

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Official Coinprism Beta API
« Reply #1 on: November 02, 2014, 11:46:48 am »
Ive used the api a few times and it worked wonderfully. Now I am getting

{
  "Message": "An error has occurred."
}

On every network broadcast request

zenki

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Official Coinprism Beta API
« Reply #2 on: May 20, 2015, 10:15:59 am »
Hi,

I want to generate my own asset ID and asset address using coinprism api, with no need to use coinprism web site in it's testnet version?


zenki

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Official Coinprism Beta API
« Reply #3 on: May 20, 2015, 12:52:51 pm »
Also, when I use the API four issue new olor or send an asset i have this error:
status: 400
headers: {Server=[Microsoft-IIS/8.5], Cache-Control=[no-cache], Expires=[-1], Pragma=[no-cache], Content-Length=[50], Date=[Wed, 20 May 2015 09:49:13 GMT], Content-Type=[application/json; charset=utf-8]}
body:{"Message":"Error","ErrorCode":"InvalidApiMethod"}

My code is like this:
public class TransactionBuilder {
public static void SendAsset() {

      String address = "https://testnet.api.coinprism.com";
      

      Client client = ClientBuilder.newClient();

      Entity payload = Entity
            .json("{  'fees': 1000,  'from': 'n1rTtCgS3tRmonD4s6FbcBMG49bQrb18wn',  "
                  + "'to': [ {'address':'bWxjNK57mGkcwwsNDzfAYx45qGrKnHJ9i1V', 'amount': '100000','asset_id':'oeED4i3XFGatENA87QcGAgab6nsPxReWSh'}]}");//
      Response response = client.target(address)
            .path("/v1/sendasset?format=json")
            .request(MediaType.APPLICATION_JSON_TYPE).post(payload);

      System.out.println("status: " + response.getStatus());
      System.out.println("headers: " + response.getHeaders());
      System.out.println("body:" + response.readEntity(String.class));
   }

   public static void main(String[] args) throws Exception {
      // IsuueColredCoins();
      SendAsset();
   }
}


« Last Edit: May 20, 2015, 03:05:38 pm by zenki »