GetFeedSubmissionResult is not Giving data in response - amazon-mws

I have tried to call GetFeedSubmissionResult api of Amazon MWS Feed submission. i have one Feedsubmissionid which is successfully gives response in "Amazon MWS Scratchpad"
but
In this when i am passing the feedsubmissionid into this api it gives below response,
Service Response=============================================================================
GetFeedSubmissionResultResponse
GetFeedSubmissionResult ContentMd5 YQtHphFPLIcA4vEOn2guCQ==
ResponseMetadata
RequestId
4f715dcf-9e89-4ad5-b721-5bb1ba6bbafa
ResponseHeaderMetadata: RequestId: 4f715dcf-9e89-4ad5-b721-5bb1ba6bbafa, ResponseContext : H5F8Si8GvjCkIIlV+vqovD1zOzXDQ+i7/xRZB46IM/XgePQAAliUi6NzK7tCrVsHM/fZFLhjQkM 0Tvk46V5dJCSmZr22uad,2LvooKOfZwPK75jMl3gDmvuK1oCUt3JWf9UvVTFfXSIhrMpIxkcjQp/ekS0I2neiRcoh0X14RWs0 na0j6cY9ZQ==, Timestamp: 2016-03-09T06:55:38.418Z
Please provide solution as soon as possible.

I get the result in correct format using CURL. I have call API using CURL and i am getting the response in XML format which is actual response.

Related

Can't get data from Marvel API - The passed referrer not allowed for the passed API key

I'm trying to get data from the Marvel API, using this request URL:
https://gateway.marvel.com:443/v1/public/characters?apikey=4dab7cb0585a4ea6c5d6a183f6769968
But, when using the fetch API method and logging the data to console. I'm get this:
{code: "InvalidCredentials", message: "The passed referrer is not allowed for the passed API key."}
Following the link you shared I get this error:
{"code":"MissingParameter","message":"You must provide a hash."}
Accoring to the documentation, you need to provide a timestamp, ts and a hash value in the request parameter.
Also check your Your authorized referrers section.If you add * and update it will allow from any host.
See docs:
https://developer.marvel.com/documentation/authorization

Data not transferring from one endpoint to another endpoint with camel

I'm requesting to https://xx.xx.x.xxx/consumers/ domain and I'm getting some response data as JSON format, and I'm passing it another endpoint direct:consumer, but in direct:consumer endpoint if print body I'm getting empty, could anyone help me how to transfer the data from one endpoint to another endpoint.
from("timer://runOnce?repeatCount=1")
.process(consumerCreate)
.to("https://xx.xx.x.xxx/consumers/").log("response data from create:: ${body}")
.to("direct:consumer");
In the below endpoint, if print the body getting an empty response, not getting JSON data
from("direct:consumer").log("the body is ${body} ");
Can anyone please help me is it expected behaviour or am I missing something?
Take a look at enabling steam caching:
https://camel.apache.org/manual/latest/stream-caching.html
Without it, the stream returned by http producer can only be read once, e.g in the first log message. Hence why nothing is printed in the second direct:consumer route when it comes to log the message body.

Converting from BTC to another currency

From Coinbase API can you convert from Bitcoin to, for example, USDC? I cannot see any reference but I have this feature on the app. I wonder if API supports (or expects support for) this operation, or it just that I'm missing something.
Looking at the Coinbase API PRO Documentation you can create a conversion by:
HTTP REQUEST
POST /conversions
API KEY PERMISSIONS
This endpoint requires the “trade” permission.
Request
{
"from": "USD",
"to": "USDC",
"amount": "10000.00"}
PARAMETERS
from: A valid currency id
to: A valid currency id
amount: Amount of from to convert to to
Probably more of a question of what the valid currencies are
There is a reference for this in the Coinbase API documentation:
https://developers.coinbase.com/api/v2#transfer-money-between-accounts
But as I stated in my question, it unfortunately doesn't seem to work:
Coinbase transfer between accounts returns "Not found"
Without using CoinbasePro API but only Coinbase API from webapp that are the endpoints you need to call:
Have to know base_id of crypto that you want to sell and base_id of
crypto want to buy. You can know it by call GET
"https://api.coinbase.com/v2/
/assets/prices?base=USD&filter=holdable&resolution=latest" and get
from response the "base_id" of your currencies.
Make an order by calling POST "https://api.coinbase.com/v2/trade"
with a request body in json like this:
{ 'amount': [amount that you want to convert], 'amount_asset':
[currency of amount that you want to convert], 'amount_from':
'input', 'source_asset': ["base_id" of crypto that you want to
sell], 'target_asset': ["base_id" of crypto that you want to buy] }
If previous POST "/trade" response code is 201, you have to get the
"id" value of response's json and do a commit of your order by
calling POST "https://api.coinbase.com/v2/trades/[id of json
response of previous https://api.coinbase.com/v2/trade POST"]/commit". If
the response code of this POST commit is 201, your exchange is
started and if there are not error in coinbase, your conversion is
done!

How to convert via the Coinbase API

Within the Coinbase app one can convert digital currencies (see the image below).
But does one convert via the Coinbase or Coinbase Pro API?
Watching API from coinbase webapp i see what endpoint you need to call:
Have to know base_id of crypto that you want to sell and base_id of crypto want to buy. You can know it by call GET "https://api.coinbase.com/v2/
/assets/prices?base=USD&filter=holdable&resolution=latest" and get from response the "base_id" of your currencies.
Make an order by calling POST "https://api.coinbase.com/v2/trade" with a request body in json like this:
{
'amount': [amount that you want to convert],
'amount_asset': [currency of amount that you want to convert],
'amount_from': 'input',
'source_asset': ["base_id" of crypto that you want to sell],
'target_asset': ["base_id" of crypto that you want to buy]
}
If previous POST "/trade" response code is 201, you have to get the "id" value of response's json and do a commit of your order by calling POST "https://api.coinbase.com/v2/trades/[id of json response of previous https://api.coinbase.com/v2/trade POST"]/commit". If the response code of this POST commit is 201, your exchange is started and if there are not error in coinbase, your conversion is done!

Coinbase Pro API GET request returning 400 for /fils and /orders when supplying query parameters

I am attempting to make a GET request for the /fills and /orders endpoints and it works if I do not add query parameters, however, if I add the query parameter "product_id=ETH-USD," I then receive a 400 response with an empty message. Is there anything else I need to do to the Authorization Header when making a GET request with query parameters?
Works: https://api.pro.coinbase.com/fills
400 Response: https://api.pro.coinbase.com/fills?product_id=ETH-USD
So the answer to my question is yes, the Authorization header needs the Body section even for the GET request. The Body section, in this instance, should have ?product_id=ETH-USD in the header signature.

Resources