Skip to content

Commit

Permalink
fix api url
Browse files Browse the repository at this point in the history
  • Loading branch information
jmicko committed Feb 29, 2024
1 parent dacd93f commit 6c4f8ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions server/modules/coinbaseClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class Coinbase {
// data should just be blank
const data = null;
const API = {
url: `https://coinbase.com/api/v3/brokerage/accounts`,
url: `https://api.coinbase.com/api/v3/brokerage/accounts`,
path: "/api/v3/brokerage/accounts",
method: 'GET',
}
Expand Down Expand Up @@ -238,7 +238,7 @@ class Coinbase {
// data should just be blank
const data = null;
const API = {
url: `https://coinbase.com/api/v3/brokerage/orders/historical/fills`,
url: `https://api.coinbase.com/api/v3/brokerage/orders/historical/fills`,
path: "/api/v3/brokerage/orders/historical/fills",
method: 'GET',
}
Expand All @@ -261,7 +261,7 @@ class Coinbase {
// data should just be blank
const data = null;
const API = {
url: `https://coinbase.com/api/v3/brokerage/orders/historical/batch`,
url: `https://api.coinbase.com/api/v3/brokerage/orders/historical/batch`,
path: "/api/v3/brokerage/orders/historical/batch",
method: 'GET',
}
Expand All @@ -283,7 +283,7 @@ class Coinbase {
// data should just be blank
const data = null;
const API = {
url: `https://coinbase.com/api/v3/brokerage/transaction_summary`,
url: `https://api.coinbase.com/api/v3/brokerage/transaction_summary`,
path: "/api/v3/brokerage/transaction_summary",
method: 'GET',
}
Expand All @@ -308,7 +308,7 @@ class Coinbase {
// data should just be blank
const data = null;
const API = {
url: `https://coinbase.com/api/v3/brokerage/products/${product_id}`,
url: `https://api.coinbase.com/api/v3/brokerage/products/${product_id}`,
path: `/api/v3/brokerage/products/${product_id}`,
method: 'GET',
}
Expand All @@ -330,7 +330,7 @@ class Coinbase {
// data should just be blank
const data = null;
const API = {
url: `https://coinbase.com/api/v3/brokerage/products`,
url: `https://api.coinbase.com/api/v3/brokerage/products`,
path: "/api/v3/brokerage/products",
method: 'GET',
}
Expand All @@ -357,7 +357,7 @@ class Coinbase {
// data should just be blank
const data = null;
const API = {
url: `https://coinbase.com/api/v3/brokerage/products/${product_id}/ticker/`,
url: `https://api.coinbase.com/api/v3/brokerage/products/${product_id}/ticker/`,
path: `/api/v3/brokerage/products/${product_id}/ticker/`,
method: 'GET',
}
Expand All @@ -384,7 +384,7 @@ class Coinbase {
// data should just be blank
const data = null;
const API = {
url: `https://coinbase.com/api/v3/brokerage/products/${product_id}/candles/`,
url: `https://api.coinbase.com/api/v3/brokerage/products/${product_id}/candles/`,
path: `/api/v3/brokerage/products/${product_id}/candles/`,
method: 'GET',
}
Expand All @@ -409,7 +409,7 @@ class Coinbase {
// data should just be blank
const data = null;
const API = {
url: `https://coinbase.com/api/v3/brokerage/orders/historical/${order_id}`,
url: `https://api.coinbase.com/api/v3/brokerage/orders/historical/${order_id}`,
path: `/api/v3/brokerage/orders/historical/${order_id}`,
method: 'GET',
}
Expand All @@ -429,7 +429,7 @@ class Coinbase {
return new Promise(async (resolve, reject) => {
try {
const API = {
url: `https://coinbase.com/api/v3/brokerage/orders`,
url: `https://api.coinbase.com/api/v3/brokerage/orders`,
path: "/api/v3/brokerage/orders",
method: 'POST',
}
Expand Down Expand Up @@ -543,7 +543,7 @@ class Coinbase {
try {

const API = {
url: `https://coinbase.com/api/v3/brokerage/orders`,
url: `https://api.coinbase.com/api/v3/brokerage/orders`,
path: "/api/v3/brokerage/orders",
method: 'POST',
}
Expand Down Expand Up @@ -601,7 +601,7 @@ class Coinbase {
// data should just be an array of IDs
const data = { order_ids: orderIdArray }
const API = {
url: `https://coinbase.com/api/v3/brokerage/orders/batch_cancel`,
url: `https://api.coinbase.com/api/v3/brokerage/orders/batch_cancel`,
path: "/api/v3/brokerage/orders/batch_cancel",
method: 'POST',
}
Expand Down
2 changes: 1 addition & 1 deletion server/modules/robot.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function MainLoopErrors(userID, err) {
devLog('10 sec timeout');
errorText = '10 second timeout. Nothing to worry about, Coinbase was just slow to respond.';
} else if (err?.response?.status === 429) {
devLog('too many requests');
devLog(err, 'too many requests');
errorText = 'Too many requests. Rate limit exceeded. Nothing to worry about.';
} else {
devLog(err, 'unknown error at end of syncOrders');
Expand Down

0 comments on commit 6c4f8ef

Please sign in to comment.