Bitcoin Forum
May 23, 2024, 08:02:02 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Do exchanges let you fill your own order?  (Read 142 times)
c_atlas (OP)
Member
**
Offline Offline

Activity: 140
Merit: 56


View Profile
May 18, 2021, 12:46:53 AM
 #1

This might not be the right board for this...

Suppose I place a sell order for 1 btc at $45k on your favourite exchange. Next, I place a buy order for 2 btc at 46k, will the exchange execute the trade?

This scenario feels pretty weird to me, I don't think it makes sense for the exchange to forbid the sell order from being submitted, but I also don't think it makes sense for it to execute the trade. What is the expected behaviour here?
AB de Royse777
Legendary
*
Offline Offline

Activity: 2492
Merit: 3902


Hire Bitcointalk Camp. Manager @ r7promotions.com


View Profile WWW
May 18, 2021, 02:22:52 AM
 #2

Suppose I place a sell order for 1 btc at $45k on your favourite exchange. Next, I place a buy order for 2 btc at 46k, will the exchange execute the trade?
You are creating two different orders. You can only create both orders if you have at least 1 BTC + $46k*2 in your exchange balance.

Assume btc price is under $45k. Once it hits $45K your 1 BTC gets sold and your balance become $45k + $46k*2 but at that time $45k will just seat idol.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
Lakai01
Legendary
*
Offline Offline

Activity: 2310
Merit: 2787


Top Crypto Casino


View Profile
May 18, 2021, 03:23:37 AM
 #3

This scenario feels pretty weird to me, I don't think it makes sense for the exchange to forbid the sell order from being submitted, but I also don't think it makes sense for it to execute the trade. What is the expected behaviour here?
Of course, it's weird and will most likely never happen in reality. However, as Royse777 said, these are 2 different orders, so I assume that the exchange also places them (and has them fulfilled). I would not know that Exchanges check the orders of a user among themselves for consistency.

You could of course try this yourself by placing sales with fractions of BTC and purchases with very small amounts of USD. However, as I said, I assume that these will also be fulfilled.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Ararbermas
Sr. Member
****
Offline Offline

Activity: 1988
Merit: 283


View Profile
May 18, 2021, 03:27:03 AM
 #4

Yes it will be filled once the candles reach that point where you set your order,

By the way for what i understand you have 2 bitcoin and place it to a different order? For what reason mate ? I think its not a good idea unless if you're really sure where's the real direction of the candle stick.. If not then its very skeptical and for sure you will have a huge lose once it fluctuate gradually and only your higher order will safe..  Think about it mate and before doing that always remember that it really required a lot of time to make observations before placing a multiple order and to have a safe trade as well in my opinion..
blockman
Hero Member
*****
Offline Offline

Activity: 2926
Merit: 627


Vave.com - Crypto Casino


View Profile
May 18, 2021, 06:06:01 PM
 #5

This might not be the right board for this...

Suppose I place a sell order for 1 btc at $45k on your favourite exchange. Next, I place a buy order for 2 btc at 46k, will the exchange execute the trade?

This scenario feels pretty weird to me, I don't think it makes sense for the exchange to forbid the sell order from being submitted, but I also don't think it makes sense for it to execute the trade. What is the expected behaviour here?
That's weird because you're making a scenario that's obviously going to be filled. Since your buy order is @ $46k then that will be filled with the sell order of 1 btc @ $45k. You hit it at an exact or lower price. But there will be a remaining 1 btc buy order @ $46k since the sell order is only 1 btc not unless there will be another sell order that shall fill with the same price. The trade will be executed automatically since you put that in order and that's going to happen no matter how you won't believe on it because that's how trading works.

JooBra
Full Member
***
Offline Offline

Activity: 1204
Merit: 162


View Profile
May 18, 2021, 08:39:29 PM
 #6

In theory it should work and it will work. Now the example is a bit stupid but it works. Do you do any technical analysis before investing or just follow the hype?
c_atlas (OP)
Member
**
Offline Offline

Activity: 140
Merit: 56


View Profile
May 18, 2021, 09:36:32 PM
 #7

This scenario feels pretty weird to me, I don't think it makes sense for the exchange to forbid the sell order from being submitted, but I also don't think it makes sense for it to execute the trade. What is the expected behaviour here?
Of course, it's weird and will most likely never happen in reality. However, as Royse777 said, these are 2 different orders, so I assume that the exchange also places them (and has them fulfilled). I would not know that Exchanges check the orders of a user among themselves for consistency.

You could of course try this yourself by placing sales with fractions of BTC and purchases with very small amounts of USD. However, as I said, I assume that these will also be fulfilled.
Thanks, and I agree, no one would realistically ever do this (unless they wrote a really shitty trading bot and didn't realize it was buggy). I was just curious what the expected behaviour was, as I've been writing an exchange in my spare time as a learning experience. To test the program, I run a simulation which randomly picks accounts and places orders; I noticed during this time that accounts occasionally fill their own orders, and wasn't sure if this was desirable.

inb4 some of you tell me no one will ever use it, I know that, I'm solely doing it to learn a new programming language (it's a technical challenge).

Do you do any technical analysis before investing or just follow the hype?
Sorry but what part of my post implied I'm a sheep? I asked a simple question about the technical workings of exchange order execution and you respond by insinuating I'm some fool?
tbct_mt2
Hero Member
*****
Offline Offline

Activity: 2338
Merit: 835



View Profile WWW
May 19, 2021, 06:54:21 AM
 #8

You can create buy and sell orders at the same time as long as you have enough money. Enough means having both BTC to sell and USDT to buy.

1 BTC to sell and enough USDT to buy 1 BTC at buying price for your order. It makes no sense because the volume of BTC is big and you can not become a whale.

If you are trading in low volume altcoins, you can create both buy and sell orders. Big orders to make them as buy and sell walls. You can control price in your wall areas.  Tongue
leea-1334
Hero Member
*****
Offline Offline

Activity: 2268
Merit: 953


Temporary forum vacation


View Profile
May 19, 2021, 06:58:10 AM
Merited by c_atlas (1)
 #9

Actually,,, the exchanges I have do not let you do it. When you already put the one buy order at the price, and you try to put another sell order at the same price, I remember getting a message saying you are not allowed to do it. Cannot remember which exchange this was but I assumed it was then for all.

.
..........
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
█████████████░░██████████████████████████░░███████████████████
███████████████░░██████████████████████████░░█████████████████
█████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████
█████████████████░░░░░░░░░░██░░██░░░░░░░░░░██░░███████████████
███████████████████░░░░░░██░░██████░░░░░░██░░█████████████████
█████████████████████░░░░░░██████████░░░░░░███████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
.....I AM BLACKJACK.FUN.....
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
█████████████░░██████████████████████████░░███████████████████
███████████████░░██████████████████████████░░█████████████████
█████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████
█████████████████░░░░░░░░░░██░░██░░░░░░░░░░██░░███████████████
███████████████████░░░░░░██░░██████░░░░░░██░░█████████████████
█████████████████████░░░░░░██████████░░░░░░███████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
..........
justdimin
Hero Member
*****
Offline Offline

Activity: 3010
Merit: 670


www.Crypto.Games: Multiple coins, multiple games


View Profile
May 19, 2021, 01:55:24 PM
 #10

Suppose I place a sell order for 1 btc at $45k on your favourite exchange. Next, I place a buy order for 2 btc at 46k, will the exchange execute the trade?
First of all, I don't know why someone would sell 1 BTC for $45k and later buy them for $46k. The orders might and might not get filled based on the market price and movement. The exchange doesn't take it upon itself to sell/buy your coins. You are basically trading with other people on a large scale. You need to understand some facts.

- Market price of a coin is determined by what value it was last traded for (sell or buy)
- Orders you place are filled when that "market price" is reached

If you meant buying at 45k and selling for 46k then it is a good strategy but the market might not move up after you buy at 45k for a while. Those are the tiny risks associated with day trading.

█████████████████████████
███████▄▄▀▀███▀▀▄▄███████
████████▄███▄████████
█████▄▄█▀▀███▀▀█▄▄█████
████▀▀██▀██████▀██▀▀████
████▄█████████████▄████
███████▀███████▀███████
████▀█████████████▀████
████▄▄██▄████▄██▄▄████
█████▀▀███▀▄████▀▀█████
████████▀███▀████████
███████▀▀▄▄███▄▄▀▀███████
█████████████████████████
.
 CRYPTOGAMES 
.
 Catch the winning spirit! 
█▄░▀███▌░▄
███▄░▀█░▐██▄
▀▀▀▀▀░░░▀▀▀▀▀
████▌░▐█████▀
████░░█████
███▌░▐███▀
███░░███
██▌░▐█▀
PROGRESSIVE
      JACKPOT      
██░░▄▄
▀▀░░████▄
▄▄▄▄██▀░░▄▄
░░░▀▀█░░▀██▄
███▄░░▀▄░█▀▀
█████░░█░░▄▄█
█████░░██████
█████░░█░░▀▀█
LOW HOUSE
         EDGE         
██▄
███░░░░░░░▄▄
█▀░░░░░░░████
█▄░░░░░░░░█▀
██▄░░░░░░▄█
███▄▄░░▄██▌
██████████
█████████▌
PREMIUM VIP
 MEMBERSHIP 
DICE   ROULETTE   BLACKJACK   KENO   MINESWEEPER   VIDEO POKER   PLINKO   SLOT   LOTTERY
c_atlas (OP)
Member
**
Offline Offline

Activity: 140
Merit: 56


View Profile
May 19, 2021, 04:54:28 PM
 #11

It makes no sense because the volume of BTC is big and you can not become a whale.

If you are trading in low volume altcoins, you can create both buy and sell orders. Big orders to make them as buy and sell walls. You can control price in your wall areas.  Tongue
This is not relevant to the topic.

First of all, I don't know why someone would sell 1 BTC for $45k and later buy them for $46k.
This was a hypothetical scenario, I already specified that this scenario is unlikely to occur, however, I wanted to know what the exchange should do if a user places this type of order.

Clearly, it's not in a users best interest, so my question was: should the exchange go out of its way to prevent the user from doing this?
See:

Thanks, and I agree, no one would realistically ever do this (unless they wrote a really shitty trading bot and didn't realize it was buggy).

You need to understand some facts.

- Market price of a coin is determined by what value it was last traded for (sell or buy)
- Orders you place are filled when that "market price" is reached
Either your reading comprehension is poor, or you didn't bother to read the (short) thread. How do you expect to contribute if you don't know what has been said? See:

I've been writing an exchange in my spare time as a learning experience. To test the program, I run a simulation which randomly picks accounts and places orders; I noticed during this time that accounts occasionally fill their own orders, and wasn't sure if this was desirable.
So actually, I "understand [the] facts" quite well, considering I've actually built a functioning electronic exchange.

Actually,,, the exchanges I have do not let you do it. When you already put the one buy order at the price, and you try to put another sell order at the same price, I remember getting a message saying you are not allowed to do it. Cannot remember which exchange this was but I assumed it was then for all.
Thanks! I think this behaviour actually makes the most sense. Preventing a user from selling lower than their highest buy (or vice versa) before their order is placed on the market seems to be correct.
leea-1334
Hero Member
*****
Offline Offline

Activity: 2268
Merit: 953


Temporary forum vacation


View Profile
May 20, 2021, 09:40:50 AM
 #12

Actually,,, the exchanges I have do not let you do it. When you already put the one buy order at the price, and you try to put another sell order at the same price, I remember getting a message saying you are not allowed to do it. Cannot remember which exchange this was but I assumed it was then for all.
Thanks! I think this behaviour actually makes the most sense. Preventing a user from selling lower than their highest buy (or vice versa) before their order is placed on the market seems to be correct.

I cannot remember the term for it but on regulated exchanges the practice is forbidden,,, for normal stock exchange and for foreign exchange markets is what it does not allow because it is just against the regulations. Maybe now for many unregulated crypto platforms they allow it but sooner or later the practice will be banned so people can only do it on DEXes I guess:)

.
..........
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
█████████████░░██████████████████████████░░███████████████████
███████████████░░██████████████████████████░░█████████████████
█████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████
█████████████████░░░░░░░░░░██░░██░░░░░░░░░░██░░███████████████
███████████████████░░░░░░██░░██████░░░░░░██░░█████████████████
█████████████████████░░░░░░██████████░░░░░░███████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
.....I AM BLACKJACK.FUN.....
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
█████████████░░██████████████████████████░░███████████████████
███████████████░░██████████████████████████░░█████████████████
█████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░███████████████
█████████████████░░░░░░░░░░██░░██░░░░░░░░░░██░░███████████████
███████████████████░░░░░░██░░██████░░░░░░██░░█████████████████
█████████████████████░░░░░░██████████░░░░░░███████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████
██████████████████████████████████████████████████████████████

▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
..........
AicecreaME
Sr. Member
****
Offline Offline

Activity: 2338
Merit: 454


View Profile
May 20, 2021, 02:46:57 PM
 #13

This might not be the right board for this...

Suppose I place a sell order for 1 btc at $45k on your favourite exchange. Next, I place a buy order for 2 btc at 46k, will the exchange execute the trade?

This scenario feels pretty weird to me, I don't think it makes sense for the exchange to forbid the sell order from being submitted, but I also don't think it makes sense for it to execute the trade. What is the expected behaviour here?

That's impossible unless you have plenty of Bitcoin in your exchange account, because if you don't, you could only do one trade which is to sell your 1 Bitcoin in the price that you want, because you can't buy 1 Bitcoin if you don't have enough balance on your account, if you know what I mean. In order to buy 1 Bitcoin for let's say $40,000 you need $40,000+ at least in your account including the trading fee, and to sell your 1 Bitcoin at the same time at a certain price, you need another Bitcoin because you're making another trade at the same time.
c_atlas (OP)
Member
**
Offline Offline

Activity: 140
Merit: 56


View Profile
May 20, 2021, 03:22:13 PM
 #14

This might not be the right board for this...

Suppose I place a sell order for 1 btc at $45k on your favourite exchange. Next, I place a buy order for 2 btc at 46k, will the exchange execute the trade?

This scenario feels pretty weird to me, I don't think it makes sense for the exchange to forbid the sell order from being submitted, but I also don't think it makes sense for it to execute the trade. What is the expected behaviour here?

That's impossible unless you have plenty of Bitcoin in your exchange account, because if you don't, you could only do one trade which is to sell your 1 Bitcoin in the price that you want, because you can't buy 1 Bitcoin if you don't have enough balance on your account, if you know what I mean. In order to buy 1 Bitcoin for let's say $40,000 you need $40,000+ at least in your account including the trading fee, and to sell your 1 Bitcoin at the same time at a certain price, you need another Bitcoin because you're making another trade at the same time.
Please don't reply to threads until you have at least partially read them. There's literally 1 page of comments, it's not that much effort...
You're at Sr. Member rank, you should understand that low quality replies are not helpful.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!