aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/coinbase_api.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/util/coinbase_api.ts')
-rw-r--r--packages/instant/src/util/coinbase_api.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/instant/src/util/coinbase_api.ts b/packages/instant/src/util/coinbase_api.ts
index 080421f98..32401e423 100644
--- a/packages/instant/src/util/coinbase_api.ts
+++ b/packages/instant/src/util/coinbase_api.ts
@@ -1,9 +1,10 @@
import { BigNumber } from '@0x/utils';
-const baseEndpoint = 'https://api.coinbase.com/v2';
+import { COINBASE_API_BASE_URL } from '../constants';
+
export const coinbaseApi = {
getEthUsdPrice: async (): Promise<BigNumber> => {
- const res = await fetch(`${baseEndpoint}/prices/ETH-USD/buy`);
+ const res = await fetch(`${COINBASE_API_BASE_URL}/prices/ETH-USD/buy`);
const resJson = await res.json();
return new BigNumber(resJson.data.amount);
},