Hello,
I am looking to get my wallet balance from my binance account to glide using API. I was wondering if somebedy already done it before ? And If yes, I would be pleased to read about it .
Thank you Glide Community !
Hello,
I am looking to get my wallet balance from my binance account to glide using API. I was wondering if somebedy already done it before ? And If yes, I would be pleased to read about it .
Thank you Glide Community !
I think this is the related docs link for what you are trying to do. So do you need a live balance, or is it ok to update it just periodically?
Hello,
Thank for your answer. I would like the upodate at least once a day and when requires by the user.
Yes I ve found this doc but i was wondering where I can add in glide my binance API?
Will you only update your own wallet balance or will you update it for other users as well?
It would be only mine.
i know how to use a simple api with glide, like i want to get btc price, I know how to add it on glide
I know how to get my API key from my Binance account, I just dont know how to use a Binance API Linked to my private API key !
This is a thread that talks about fetching with a JavaScript column. However, please proceed with caution as it might expose your API key.
An alternative is using a service like Make to fetch the data and bring that back to Glide using a HTTP call.
Hello,
Thank you for your answer.
I have a another question which is, where do I put my Private API key in glide.
For exemple if I want to get market value for crypto, I can either use ( Picture 1 )
So my question is where do I put my private key in glide ? This will be for binance, coinmarket cap or all other plateform asking for a private key.
Thank you for the answers
There is no native option for securing API keys at the moment, however Glide have indicated that they may provide a mechanism for making secure authenticated API calls in the future.
So for the moment what I want to do is impossible?
It’s possible, but it’s not possible to do it purely in Glide in a secure manner.
What you could do is use something external to Glide (such as Make) to make the API call, and then push the result in via the API.
alright i will try thisway thank you
In case it helps anyone who finds this thread later: the safest way is still the one Darren described, keep the Binance secret out of Glide completely and let a small script on your own server or a scheduled job do the signed call, then push the result into a Glide Big Table through the Glide API.
With Node.js 18 or newer that is only a few lines. The binance package signs the request for you, so there is no HMAC code to write:
import { MainClient } from 'binance';
const binance = new MainClient({
api_key: process.env.BINANCE_API_KEY, // read-only key, IP restricted to this server
api_secret: process.env.BINANCE_API_SECRET,
});
const account = await binance.getAccountInformation({ omitZeroBalances: true });
const updatedAt = new Date().toISOString();
const rows = account.balances.map((b) => ({
asset: b.asset,
free: Number(b.free),
locked: Number(b.locked),
updatedAt,
}));
// Replace the rows of a Glide Big Table with the latest balances
const res = await fetch(`https://api.glideapps.com/tables/${process.env.GLIDE_TABLE_ID}`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.GLIDE_API_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ rows }),
});
console.log(res.status, await res.text());
npm install binance
BINANCE_API_KEY=... BINANCE_API_SECRET=... GLIDE_API_TOKEN=... GLIDE_TABLE_ID=... node balances.mjs
A few tips:
The secret never reaches the app, and the app only ever sees the numbers. More examples for the Binance API from JavaScript: Binance API JavaScript & TypeScript SDK for Node.js | Siebly