<p>You're users are not in control of the private keys, so you do not need to lock them via the Bitcoin protocol. This is just a simple permission feature you should build into your system using a database. If a user "buys from you" then update a field in your database for that user, for example the database field could be called <code>locked</code> and then you would have it changed to <code>true</code>.  Then make sure that you build your system to check this field is <code>false</code> every time prior to withdrawal. </p>

CC BY-SA 3.0
2017-10-18T03:52:17.870Z
2017-10-18T03:52:17.870Z
m1xolyd1an
<p>I am working with the blockchain wallet API and my workflow is something like this: whenever the user wants to buy BTC from me, at that time, whatever the amount is added by the buyer, at that time that particular amount will be locked from his account, and after a while that amount will be released and transferred to another user.</p>

<p>Is there any way to implement this?</p>

CC BY-SA 3.0
2017-10-17T08:52:42.427Z
Hi and welcome to Bitcoin.SE :) I've voted to close this question as too broad, because you seem to be asking about how to implement an entire payment system of some sort rather than a specific question.
meshcollider
CC BY-SA 3.0
2017-10-17T08:55:32.803Z
No, @MeshCollider i already implemented the transactions systems but i want to add some security concerns so to do that i am bit stucked
Chirag Daxini
CC BY-SA 3.0
2017-10-17T09:05:28.853Z
In that case you'll have to clarify your question to make it more specific, because as it stands I don't understand what exactly you are asking. Sounds more like a programming question than a bitcoin question.
meshcollider
CC BY-SA 3.0
2017-10-17T09:15:28.003Z
@MeshCollider... i asked specifically like there will be buyer and seller are there in my site so when seller user go for sell BTC that time from that BTC amount will be locked for a while then his BTC will released and credited to buyer's account.
Chirag Daxini
CC BY-SA 3.0
2017-10-17T10:39:57.150Z
It sounds like this is a programming issue dealing with credit in accounts in your software's database. It wouldn't need to touch the blockchain until you want to make a transaction on that. Perhaps stackoverflow is a better site to ask about the programming side of things? Or are you trying to put the time lock into the Bitcoin transaction?
Highly Irregular
CC BY-SA 3.0
2017-10-17T11:05:50.480Z
I like to  put lock into the Bitcoin transactions.
Chirag Daxini
<blockchain><blockchain-wallet-app>
Lock BTC amount for a while
Chirag Daxini
# Lock BTC amount for a while

(Asked by: username_0 on 2017-10-17)

I am working with the blockchain wallet API and my workflow is something like this: whenever the user wants to buy BTC from me, at that time, whatever the amount is added by the buyer, at that time that particular amount will be locked from his account, and after a while that amount will be released and transferred to another user.

Is there any way to implement this?

**Tags:** blockchain, blockchain-wallet-app

> **Comments:**
> **username_1**: Hi and welcome to Bitcoin.SE :) I've voted to close this question as too broad, because you seem to be asking about how to implement an entire payment system of some sort rather than a specific question.  
> **username_0**: No, @MeshCollider i already implemented the transactions systems but i want to add some security concerns so to do that i am bit stucked  
> **username_1**: In that case you'll have to clarify your question to make it more specific, because as it stands I don't understand what exactly you are asking. Sounds more like a programming question than a bitcoin question.  
> **username_0**: @MeshCollider... i asked specifically like there will be buyer and seller are there in my site so when seller user go for sell BTC that time from that BTC amount will be locked for a while then his BTC will released and credited to buyer's account.  
> **username_2**: It sounds like this is a programming issue dealing with credit in accounts in your software's database. It wouldn't need to touch the blockchain until you want to make a transaction on that. Perhaps stackoverflow is a better site to ask about the programming side of things? Or are you trying to put the time lock into the Bitcoin transaction?  
> **username_0**: I like to  put lock into the Bitcoin transactions.  

---

## 1 answers

### Answer by username_3 on 2017-10-18. Score: 1

You're users are not in control of the private keys, so you do not need to lock them via the Bitcoin protocol. This is just a simple permission feature you should build into your system using a database. If a user "buys from you" then update a field in your database for that user, for example the database field could be called `locked` and then you would have it changed to `true`. Then make sure that you build your system to check this field is `false` every time prior to withdrawal.


---

