D3.json request falls flat

Is failure inevitable in this scenario?

d3.json("https://api.kraken.com/0/public/Time",
   function(){
      console.log(arguments);
   });

I'm encountering a familiar CORS hurdle

XMLHttpRequest cannot load https://api.kraken.com/0/public/Time/. No 'Access-Control-Allow-Origin' header is present on the requested resource.
, however, I have no trouble accessing
https://api.kraken.com/0/public/Ticker
.

I've invested quite some time already into this.

UPDATE:

My call to /Ticker works fine:

var myurl = "https://api.kraken.com/0/public/Trades";
var data = "pair=ETHXBT";
var r = d3.json(myurl).header("content-type", "application/x-www-form-urlencoded").post(data, function(error, response){console.log(arguments);});

This attempt for /Trades fails (yet again, 'Access-Control-Allow-Origin' error):

var myurl = "https://api.kraken.com/0/public/Trades";
var data = "pair=ETHXBT";
var r = d3.json(myurl).header("content-type", "application/x-www-form-urlencoded").post(data, function(error, response){console.log(arguments);});

Check out the Kraken API description here:

At this point, I acknowledge my shortcomings, but I seek your guidance to assess their depth.

Answer №1

Received this response directly from the Kraken support team:

Hello,

We appreciate you getting in touch with us. CORS is only permitted for ticker data. Feel free to ask if you have more questions!

Best Regards,

...

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Icons in React are used to visually represent various actions

I am facing an issue with the React icons I imported on my personal website. They are not displaying at all. Despite reinstalling React Icons multiple times, with and without --save, the problem persists. I have thoroughly checked both the node_modules dir ...

Error: HTMLAnchorElement.linkAction is attempting to access an undefined property 'add', resulting in an uncaught TypeError

Displaying the following: Error: Cannot read property 'add' of undefined at HTMLAnchorElement.linkAction const navigationLinks = document.querySelectorAll('.nav__link') function handleLinkAction(){ // Activate link navLin ...

Node.js/Express - unable to retrieve client body data on server

I am able to retrieve data from express but I am facing issues when trying to post data to express... client: <html> <button onclick="myFunction()">send</button> <script> const data = {"experience" : 0}; ...

Determine if a specific value is present within an array consisting of multiple objects using Mongoose

In my collection, I have a scenario where I need to utilize the $in operator. Person = { name: String, members: [ {id: String, email: String}... {}] } Currently, I am using the following: Person.find({members: {"$in": [id1]}}) However, I am aware of ...

Navigating JSON Data with ES6 Iteration

Issue Description There are two APIs I am working with. The first one, let's call it API #1, provides JSON data related to forum posts as shown below: [{ "userId": 1, "id": 10, "title": "Tt1", "body": "qBb2" }, { "userId": 2, ...

Occasional Laravel Token Mismatch Issues

In my Laravel application, the token is displayed in a field on each page. This token is then loaded by jQuery into every ajax request, as explained in this answer: Laravel 5 CSRF global token hidden field for all forms in a page However, I occasionally e ...

Is there a possible method to obtain a smartphone number from a website?

Seeking a solution to retrieve the phone number of a device using HTML 5, JavaScript, or similar technology. Recently, I successfully obtained the coordinates of the device by incorporating the following JavaScript code: <!DOCTYPE html> <html> ...

Implementing subscriber addition on Mailchimp 3.0 using Node.js and HTTPS

Here's the content of my app.js file: const express = require("express"); const bodyParser = require("body-parser"); const request = require("request"); const https = require("https"); const app = express(); app.use(express.static("public")); app.u ...

How can I display a calendar with a complete month view using ng-repeat?

I was trying to replicate a table similar to the one shown in this image: (disregard the styling). I am struggling with how to properly format the data to create a similar table in HTML. $scope.toddlers = [ { "name": "a", "day": 1, "total": 3 }, { ...

The error message "Adyencheckout is not a constructor" is popping up in my

Struggling to implement the Adyen dropin payment UI in NextJS and facing issues initializing the Adyen dropin component. Attempting to dynamically import Adyen web to avoid window is not defined error, but uncertain on how to use it as a constructor after ...

Import the .obj file along with its original color information, without the need for the accompanying

I am facing a challenge with a .obj file that appears colored in software like MeshLab or Microsoft's 3D builder. However, there is no .mtl file linked to it. When I try to open it in ThreeJs using the most basic method, it shows up as grey. var load ...

Looping through Vue with multiple options

Looking for help with Vue2 looping to display multiple options within a select element. We have an object structured like this; sorting = { name: [ 'asc', 'desc' ], price: [ 'cheapest', ...

Converting Node JS request to an API into React Fetch syntax

I have encountered a problem while developing an app in React-Native that connects with the Hubspot API. Initially, I tried to make the request using the Node JS request module, but it didn't work well with React Native when Expo was involved. Now, I ...

Addressing three visual problems with an html form input, dropdown menu, and clickable button

Currently, the output of my code looks like this: https://i.stack.imgur.com/pl5CJ.jpg The first box (squared) represents an <input>, while the second box (rectangled) is a <select>. There are several issues that I am facing: The text entered ...

Stop const expressions from being widened by type annotation

Is there a way to maintain a constant literal expression (with const assertion) while still enforcing type checking against a specific type to prevent missing or excess properties? In simpler terms, how can the type annotation be prevented from overriding ...

no data retrieved from YouTube API query

I'm puzzled as to why the items array is coming up empty. Can someone point out what's causing this issue? Thank you. jQuery(document).ready(function ($) { $('#infl-yt-label').on('click', function() { //$('#infl-inp ...

Don't use onchange() in place of keyup()

Issue: I am facing a problem where the keyup() function is calling ajax multiple times with each key press, and I have tried using onChange() but it did not work as expected. Here is the code to check if an email already exists in the database: $.noConf ...

Implementing code to scroll and play multiple videos simultaneously using JavaScript and jQuery

This solution currently only works for one video, but it needs to be able to handle multiple videos (TWO OR MORE) <html> <head> <script src="https://code.jquery.com/jquery-1.8.0.min.js" integrity="sha256-jFdOCgY5bfpwZLi ...

What are some ways to personalize column design when a Kendo grid column is automatically created?

I am populating the Kendo grid with data using JavaScript: var dataSource = new kendo.data.DataSource({ transport: { read: { url: "@Url.Action("GetProductList", "Home")", type: "POST&qu ...

props remain undefined even after being assigned in the redux store

I encountered an unusual error related to a reducer called prs when adding or deleting a person in an app. Essentially, this app allows users to add or remove a person with a unique ID assigned to each individual. To start off, here is the parent componen ...