fixed my price feeding script with chatgpt

in #steemlast year

Awesome! smooth and easy


image uploaded on https://nostr.build/

const axios = require('axios');

// Define Binance API URL
const baseUrl = 'https://api.binance.com';

// Get spot price ticker
function getSpotPrice(symbol) {
const endpoint = '/api/v3/ticker/price';
const url = baseUrl + endpoint + '?symbol=' + symbol;

// Send request
return axios.get(url);
}

// Example: get STEEM/USDT spot price ticker
getSpotPrice('STEEMUSDT')
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.error(error);
});

Sort:  

You've got a free upvote from witness fuli.
Peace & Love

buen algoritmo y gracias por su voto dios le bendiga
good algorithm and thanks for your vote god bless you

You've got a free upvote from @hussa fuli.
Peace & Love!

감사합니다

tnx for the upvote

exellent 👍👍

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 63648.37
ETH 3125.02
USDT 1.00
SBD 3.87