BitShares Forum

Main => Technical Support => Topic started by: lil_jay890 on April 17, 2015, 01:15:36 pm

Title: Rolling over a short position
Post by: lil_jay890 on April 17, 2015, 01:15:36 pm
I have short that is set to expire in a few days.  I don't want to close it as a loss and would prefer to roll it over.  Every other short I have done I had let expire and have realized I get killed by that 10% buying envelope.  What is the easiest way to roll over a short?
Title: Re: Rolling over a short position
Post by: Troglodactyl on April 17, 2015, 01:35:01 pm
It isn't completely risk free because someone can issue another interfering order at the same time, but the basic process is this:

Check that there are no current expired orders, no bids high above the feed, and check the interest rate and price limit for any current shorts.  Create a short order in the gap between highest bid and lowest ask and click short, but don't confirm it yet.  Create a matching buy order to buy up all of your short, but don't submit it yet either.  Double check the feed and order books to make sure your orders will currently be matched with each other, and then quickly confirm both orders so they make it into the same block.  Assuming no one else submits an order in the same block that crosses over your order price, they'll match and you can use the BitAsset from your new short to cover your old short, effectively recollateralizing and extending the expiration to 30 days.
Title: Re: Rolling over a short position
Post by: Markus on April 17, 2015, 01:40:07 pm
Yes, definitely check that there are no expired orders! If there are you will have to wait until someone else fills them. A bug currently prevents new shorts to be accepted when there are any expired orders.
Title: Re: Rolling over a short position
Post by: lil_jay890 on April 17, 2015, 02:01:20 pm
It isn't completely risk free because someone can issue another interfering order at the same time, but the basic process is this:

Check that there are no current expired orders, no bids high above the feed, and check the interest rate and price limit for any current shorts.  Create a short order in the gap between highest bid and lowest ask and click short, but don't confirm it yet.  Create a matching buy order to buy up all of your short, but don't submit it yet either.  Double check the feed and order books to make sure your orders will currently be matched with each other, and then quickly confirm both orders so they make it into the same block.  Assuming no one else submits an order in the same block that crosses over your order price, they'll match and you can use the BitAsset from your new short to cover your old short, effectively recollateralizing and extending the expiration to 30 days.

Thanks for the quick answer.  Do I have to do anything with the "cover" button on my existing short?
Title: Re: Rolling over a short position
Post by: lil_jay890 on April 22, 2015, 01:14:06 am
I've been trying to do this, and I keep getting:
Invalid asset amount (35005)
Does this look familiar?
Title: Re: Rolling over a short position
Post by: Xeldal on April 22, 2015, 01:27:51 am
I've been trying to do this, and I keep getting:
Invalid asset amount (35005)
Does this look familiar?
If your using 0.9.0 try setting the collateral to a number without a decimal place.  I was getting the same error and this helped.  Its a bug due to recent changes.

https://bitsharestalk.org/index.php/topic,15851.msg203637.html#msg203637
Title: Re: Rolling over a short position
Post by: lil_jay890 on April 22, 2015, 03:10:49 am
I've been trying to do this, and I keep getting:
Invalid asset amount (35005)
Does this look familiar?
If your using 0.9.0 try setting the collateral to a number without a decimal place.  I was getting the same error and this helped.  Its a bug due to recent changes.

https://bitsharestalk.org/index.php/topic,15851.msg203637.html#msg203637

Thanks Xeldal, that seems to have worked.