mirror of
https://github.com/corda/corda.git
synced 2025-05-23 18:54:14 +00:00
CORDA-1080 - Doc update to make instructions clearer (#2599)
This commit is contained in:
parent
0c62c6d850
commit
ce4392ef31
@ -103,7 +103,7 @@ party to Bank A and Bank A will appear as a counter party
|
|||||||
|
|
||||||
In what follows, we assume we are Bank A (which is listening on port 10005)
|
In what follows, we assume we are Bank A (which is listening on port 10005)
|
||||||
|
|
||||||
Notice the id field in the output of the ``whoami`` command. We are going to use the id assocatied
|
Notice the id field in the output of the ``whoami`` command. We are going to use the id associated
|
||||||
with Bank C, one of our counter parties, to create a trade. The general command for this is:
|
with Bank C, one of our counter parties, to create a trade. The general command for this is:
|
||||||
|
|
||||||
curl -i -H "Content-Type: application/json" -X PUT -d <<<JSON representation of the trade>>> http://localhost:10005/api/simmvaluationdemo/<<<counter party id>>>/trades
|
curl -i -H "Content-Type: application/json" -X PUT -d <<<JSON representation of the trade>>> http://localhost:10005/api/simmvaluationdemo/<<<counter party id>>>/trades
|
||||||
@ -123,14 +123,23 @@ where the representation of the trade is
|
|||||||
"fixedRate" : "0.1"
|
"fixedRate" : "0.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
Continuing our example, the specific command we would run is
|
Continuing our example, the specific command would look as follows
|
||||||
|
|
||||||
curl -i -H "Content-Type: application/json" \
|
curl -i -H "Content-Type: application/json" \
|
||||||
-X PUT \
|
-X PUT \
|
||||||
-d '{"id":"trade1","description" : "desc","tradeDate" : [ 2016, 6, 6 ], "convention" : "EUR_FIXED_1Y_EURIBOR_3M", "startDate" : [ 2016, 6, 6 ], "endDate" : [ 2020, 1, 2 ], "buySell" : "BUY", "notional" : "1000", "fixedRate" : "0.1"}' \
|
-d '{"id":"trade1","description" : "desc","tradeDate" : [ 2016, 6, 6 ], "convention" : "EUR_FIXED_1Y_EURIBOR_3M", "startDate" : [ 2016, 6, 6 ], "endDate" : [ 2020, 1, 2 ], "buySell" : "BUY", "notional" : "1000", "fixedRate" : "0.1"}' \
|
||||||
http://localhost:10005/api/simmvaluationdemo/8Kqd4oWdx4KQGHGL1DzULumUmZyyokeSGJDY1n5M6neUfAj2sjbf65wYwQM/trades
|
http://localhost:10005/api/simmvaluationdemo/8Kqd4oWdx4KQGHGL1DzULumUmZyyokeSGJDY1n5M6neUfAj2sjbf65wYwQM/trades
|
||||||
|
|
||||||
With an expected response of
|
Note: you should replace the node id 8Kqd4oWdx4KQGHGL1DzULumUmZyyokeSGJDY1n5M6neUfAj2sjbf65wYwQM with the node id returned by the
|
||||||
|
whoami call above for one of the counterparties. In our worked example we selected "Bank C" and used the generated id for that node.
|
||||||
|
Thus, the actual command would be:
|
||||||
|
|
||||||
|
curl -i -H "Content-Type: application/json" \
|
||||||
|
-X PUT \
|
||||||
|
-d '{"id":"trade1","description" : "desc","tradeDate" : [ 2016, 6, 6 ], "convention" : "EUR_FIXED_1Y_EURIBOR_3M", "startDate" : [ 2016, 6, 6 ], "endDate" : [ 2020, 1, 2 ], "buySell" : "BUY", "notional" : "1000", "fixedRate" : "0.1"}' \
|
||||||
|
http://localhost:10005/api/simmvaluationdemo/<<<INSERT BANK C ID HERE>>/trades
|
||||||
|
|
||||||
|
Once executed, the expected response is:
|
||||||
|
|
||||||
HTTP/1.1 202 Accepted
|
HTTP/1.1 202 Accepted
|
||||||
Date: Thu, 28 Sep 2017 17:19:39 GMT
|
Date: Thu, 28 Sep 2017 17:19:39 GMT
|
||||||
@ -141,7 +150,7 @@ With an expected response of
|
|||||||
|
|
||||||
**Verifying trade completion**
|
**Verifying trade completion**
|
||||||
|
|
||||||
With the trade completed and stored by both parties, the complete list of trades with our couterparty can be seen with the following command
|
With the trade completed and stored by both parties, the complete list of trades with our counterparty can be seen with the following command
|
||||||
|
|
||||||
curl -X GET http://localhost:10005/api/simmvaluationdemo/<<<counter party id>>>/trades
|
curl -X GET http://localhost:10005/api/simmvaluationdemo/<<<counter party id>>>/trades
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user