Try this:
curl http://localhost:4000/api/ --user rpc:1234 -H 'Content-Type: application/json; charset=UTF-8' -H 'Accept: application/json, text/javascript' --data-binary '{"jsonrpc":"2.0","id":0,"method":"get_asset_info","params": {"assets": ["CP_ASSET_NAME"]}}'
Where:
-
URL - API server accessible to your client (in this case,
localhost
) -
user - default user name (
rpc
, can be any other name) to access counterparty daemon (by default stored incounterparty-server.conf
andcounterparty-server.testnet.conf
) -
password - password (
1234
, should be a more complex one) for the rpc user (by default it stored in the counterparty config file(s)) -
H - HTML headers
-
data-binary - data passed to Counterparty API
-
method:
get_asset_info function
- gets information on an asset name (see Counterparty API) -
parameters: for this method requires
asset <NAME>
, which specifies queried asset name (use a real asset name such asXCP
)