Bitcoin Forum
May 05, 2024, 12:12:31 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / Re: Deposit adress notification on: March 22, 2023, 08:01:49 PM
Working on building a small exchange, someting like sideshift.ai.

 When a user sends crypto to the deposit adress, he will get a notification that they are accepted by the blockchain network.
 Something like:
" thanks for your deposit, We will now exchange your BTC and send 0.124 ETH  to your wallet. You can now close your browser if you want".

I will have like 50 different coins in total, so not only BTC and ETH.


will this work?
https://cryptoapis.io/products/blockchain-events

Would be great with a free one but i could pay few dollars i have to.
Or maybee some other way of doing it?




It will be a little wrong if you want to implement logic like this, because usually only when a number of confirmations are calculated, then the system will send a notification that their payment is made to us, whether it's via email or telephone number. And moreover, usually APIs like this will be paid, so you need to think about the economic value of the exchange you build to be able to pay for services like this.

I found an exchange service that you can copy to build the exchange the way you want, the name is https://changelly.com, you can see that they are very good at building their system and I've used the service, and I think it's pretty good, but we need to exchange min 23 USD to be able to use this service, so I don't use it much.







yes i know changley, but they have high fee what i remember.
On my exchange, i would have like 1% fee, not 5-10% like changley.
2  Bitcoin / Project Development / Re: Deposit adress notification on: March 22, 2023, 06:50:11 PM
I already gave you a few sites in your previous post, have you looked into them? If not, you should. They have notifications API[1][2]. The site you mentioned should do the trick too, but not with the free tier because it looks like it's only available with the testnet.

For bitcoin, yes blockchain.com API is fine:

Quote
This method monitors an address of your choice for received and / or spent payments. You will be sent an HTTP notification immediately when a transaction is made, and subsequently when it reaches the number of confirmations specified in the request.

Also, please try to not make multiple posts about the same subject.

[1] https://www.quicknode.com/quickalerts
[2] https://www.alchemy.com/notify-api

Alchemy had only 4 networks to choose from, ethereum, optimism, polygon, and arbitrum.
I need also BTC, FTM, SOLANA, AVALACNHE network.

And quicknode was not free, its like 50 usd a month.
But thanks anyway Smiley
3  Bitcoin / Project Development / Re: Deposit adress notification on: March 21, 2023, 12:10:21 AM
When a user sends crypto to the deposit adress, he will get a notification that they are accepted by the blockchain network.
 Something like:
" thanks for your deposit, We will now exchange your BTC and send 0.124 ETH  to your wallet. You can now close your browser if you want".

I don't think this is right, the user should get the message when the deposit is confirmed and not when the deposit is sent to the address, and this is really important because if you make a swap without confirmation people would be able to abuse your system with a double spend.

And the way to do this directly from your coin node, is with the command "blocknotify", each time your node detects a node you should verify if there is a depo. That's the way to do it in the backend.

so this will not work?
https://www.blockchain.com/explorer/api/api_receive

No, just look at mycelium wallet where you can see you are reciving btc but it still has no confirmation.
4  Bitcoin / Project Development / Deposit adress notification on: March 20, 2023, 07:17:10 PM
Working on building a small exchange, someting like sideshift.ai.

 When a user sends crypto to the deposit adress, he will get a notification that they are accepted by the blockchain network.
 Something like:
" thanks for your deposit, We will now exchange your BTC and send 0.124 ETH  to your wallet. You can now close your browser if you want".

I will have like 50 different coins in total, so not only BTC and ETH.


will this work?
https://cryptoapis.io/products/blockchain-events

Would be great with a free one but i could pay few dollars i have to.
Or maybee some other way of doing it?


5  Bitcoin / Bitcoin Technical Support / Re: Many adresses for many coins. Building exchange on: March 17, 2023, 09:03:00 PM
I'm curious why Binance, which is an exchange, needed for your exchange.

Off the top of my head, here is a summary of how to create a simple exchange where you set the prices instead of using a market (because it is easier).

  • 1. Create a wallet for each kind of coin.
  • 2. Create a database for trades. Each entry would contain the amounts for each coin and their receiving addresses.
  • 3. Create a site that allows a person to create a trade.
    • 3a. The site gets an address from the wallet for the coin the customer is sending and shows it to the customer.
    • 3b. The set gets an address from customer for the coins the customer is buying.
    • 3c. The site records the transaction in the database.
  • 4. Create a backend that periodically scans the transaction database, gets the receiving addresses for the pending trades and checks the wallets to see if the coins have arrived. When the coins for a trade have arrived, it sends the customer's coins to the address they provided.

There you go. No need for Binance. Is that what you are doing?


Of course, I'm sure that there is a lot more involved in the implementation. You don't want to get hacked or end up like Mt. Gox.



I keep my funds on a exchange, and i need an exchange to be able to echange the users crypto that is sent to me.

How would i exchange the users crypto for like 1% fee if i didnt use an exchange?
6  Bitcoin / Bitcoin Technical Support / Re: Many adresses for many coins. Building exchange on: March 15, 2023, 05:54:54 PM
AFAIK, there's no way to generate a new address using Binance API.

What you need to do is run your own node, and communicate with it.

1. A user chooses the trading pairs.
2. You generate a bitcoin address for him.
3. Wait for a certain number of confirmations.
4. Send him the money.

I understand what you're trying to do, and one solution would be to once you're done with #3, you transfer the funds directly to Binance, and from there, you can exchange the funds and withdraw them however, I don't think this is the best solution because it will result into a very bad experience (since the user has to wait more than he should).

It's better to have some liquidity aside on Binance at first if this is how you want to do it and instead of sending each transaction you receive directly to Binance, you wait until you get a few, then batch everything to Binance. This should also save you some fees.

The user will have a uniqe order-id, so i was thinking if i could log that, plus his reciving adress and the amount he sent.
Then i would get notification when his coins arrive to my binance account and then just send him back 5% less ETH if i charged a 5% fee.

But he still would not get any notification that i have recived his coins while he is waiting or me to complete the exchange. 


I like you 1-4 description, thats exactly how i want it to work.
Do i need a node for each coin, like if i have 50 different coins, do i need a node for each one?
And what could that cost?



7  Bitcoin / Bitcoin Technical Support / Re: Many adresses for many coins. Building exchange on: March 15, 2023, 05:35:17 PM
Im making an exchange
~
How do i generate a new deposit adress for each new user
If you have to ask this, you shouldn't build an exchange.

Wow, you are talking so much shit.

Its not rocketscience making a small exchange, and its even easier to maintain when its all set up.

It like i would say" if you have to ask how to fix a car, you shouldnt drive one".
8  Bitcoin / Bitcoin Technical Support / Many adresses for many coins. Building exchange on: March 15, 2023, 04:15:58 PM
Im making an exchange like sideshift.ai.
I have 2 questions.


1. How do i generate a new deposit adress for each new user and each coin?

Like if you want to exchange BTC to ETH, you will get a BTC adress/QR code to send to.
But that unique adress needs to go to my binance account, or at least the deposit has to go to binance account. 
Is there like any API or so that generates sub adresses and then binding them all to my static btc adress on binance?

2. When a user send crypto to the deposit adress, he will get a notification that they are accepted by the blockchain network.
 Something like:
" thanks for your deposit, We will now exchange your BTC and send 0.124 ETH  to your wallet. You can now close your browser if you want".


I will have like 50 different coins in total, so not only BTC and ETH.

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!