Advertisement
doanhtu

swagger doc 1

May 8th, 2018
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 25.63 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3.   description: "This is a BlockEx's Bond Tool RESTful API server"
  4.   version: "1.0.0"
  5.   title: "BlockEX API Documents"
  6. host: "BlockEXhost"
  7. basePath: "/"
  8. tags:
  9. - name: "issuer"
  10.   description: "Issuer API endpoints"
  11. - name: "investors"
  12.   description: "Investor list and detail API endpoints"
  13. - name: "account"
  14.   description: "Investor Account related API endpoints"
  15. - name: "Bond"
  16.   description: "Evething about Bond"
  17. - name: "document"
  18.   description: "Evething about bonds document"
  19. schemes:
  20. - "http"
  21. securityDefinitions:
  22.   JWT:
  23.     type: apiKey
  24.     name: Authorization
  25.     in: header
  26.     description: |
  27.     For accessing the API a valid JWT token must be passed in all the queries in
  28.       the 'Authorization' header.
  29.       The following syntax must be used in the 'Authorization' header :
  30.  
  31.         JWT xxxxxx.yyyyyyy.zzzzzz
  32. consumes:
  33. - application/json
  34. produces:
  35. - application/json
  36. security:
  37.   - JWT: []
  38. paths:
  39.   /issuers:
  40.     get:
  41.       tags:
  42.      - "issuer"
  43.       summary: Get issuer list
  44.       description: Returns a list containing all issuers.
  45.       responses:
  46.         200:
  47.           description: A list of issuers
  48.           schema:
  49.             type: array
  50.             items:
  51.               $ref: '#/definitions/IssuerDetail'
  52.         404:
  53.           description: No issuers found.
  54.  
  55.   /issuers/{volt_id}:
  56.     get:
  57.       tags:
  58.      - "issuer"
  59.       summary: Get issuer detail
  60.       description: Returns issuer detail.
  61.       parameters:
  62.         - name: volt_id
  63.           in: path
  64.           required: true
  65.           description: Volt ID
  66.           type: integer
  67.       responses:
  68.         200:
  69.           description: Issuer detail
  70.           schema:
  71.             $ref: '#/definitions/IssuerDetail'
  72.         404:
  73.           description: Issuer not found
  74.   /investors:
  75.     get:
  76.       tags:
  77.      - "investors"
  78.       summary: Gets investors list
  79.       description: Returns a list containing all investors.
  80.       parameters:
  81.         - name: bond_id
  82.           in: query
  83.           required: false
  84.           description: Get investors for specific Bond.
  85.           type: string
  86.       responses:
  87.         200:
  88.           description: A list of investors
  89.           schema:
  90.             type: array
  91.             items:
  92.               properties:
  93.                 id:
  94.                   type: string
  95.                   example: '4bd295a0-3a60-4326-969b-9b39900d4750'
  96.                 email:
  97.                   type: string
  98.                   example: 'example@gmail.com'
  99.                 user_name:
  100.                   type: string
  101.                   example: 'username'
  102.                 name:
  103.                   type: string
  104.                   example: 'Jeff'
  105.                 status:
  106.                   type: integer
  107.                   example: 1
  108.                 created_date:
  109.                   type: string
  110.                   example: '2018-04-06T12:02:25.883459+00:00'
  111.                 updated_date:
  112.                   type: string
  113.                   example: '2018-04-06T12:02:25.883459+00:00'
  114.  
  115.   /investors/{pk}:
  116.     get:
  117.       tags:
  118.      - "investors"
  119.       summary: Gets investors detail data
  120.       description: Returns a object containing an investor detail data
  121.       parameters:
  122.         - name: pk
  123.           in: path
  124.           required: true
  125.           description: Investor ID
  126.           type: string
  127.       responses:
  128.         200:
  129.           description: An investor data
  130.           schema:
  131.             type: object
  132.             properties:
  133.               id:
  134.                 type: string
  135.                 example: '4bd295a0-3a60-4326-969b-9b39900d4750'
  136.               email:
  137.                 type: string
  138.                 example: 'example@gmail.com'
  139.               user_name:
  140.                 type: string
  141.                 example: 'username'
  142.               name:
  143.                 type: string
  144.                 example: 'Jeff'
  145.               status:
  146.                 type: integer
  147.                 example: 1
  148.               created_date:
  149.                 type: string
  150.                 example: '2018-04-06T12:02:25.883459+00:00'
  151.               updated_date:
  152.                 type: string
  153.                 example: '2018-04-06T12:02:25.883459+00:00'
  154.         404:
  155.           description: Investor not found
  156.  
  157.   /investor/view-balance/{pk}:
  158.     get:
  159.       tags:
  160.      - "account"
  161.       summary: Gets account balance
  162.       description: Returns a object containing account data and it's balance
  163.       parameters:
  164.         - name: pk
  165.           in: path
  166.           required: true
  167.           description: Account ID
  168.           type: string
  169.       responses:
  170.         200:
  171.           description: Account balance
  172.           schema:
  173.             type: object
  174.             properties:
  175.               balance:
  176.                 type: number
  177.                 example: 1343.2
  178.               id:
  179.                 type: string
  180.                 example: '720c7df7-2dcd-449f-bdef-0e761eba7474'
  181.               balance_updated_date:
  182.                 type: string
  183.                 example: '2018-04-27T15:17:12.877226+00:00'
  184.               name:
  185.                 type: string
  186.                 example: 'Account 1'
  187.               currency:
  188.                 type: string
  189.                 example: 'USD'
  190.               created_date:
  191.                 type: string
  192.                 example: '2018-04-27T15:17:12.877226+00:00'
  193.               updated_date:
  194.                 type: string
  195.                 example: '2018-04-27T15:17:12.877226+00:00'
  196.         404:
  197.           description: Account not found
  198.  
  199.   /investor/update-balance/{pk}:
  200.     post:
  201.       tags:
  202.      - "account"
  203.       summary: Create a transaction
  204.       description: Returns a object containing created transaction data
  205.       parameters:
  206.         - name: pk
  207.           in: path
  208.           required: true
  209.           description: Bond ID
  210.           type: string
  211.         - name: body
  212.           in: body
  213.           required: true
  214.           schema:
  215.             type: object
  216.             properties:
  217.               type:
  218.                 type: string
  219.                 example: 'Deposit'
  220.               amount:
  221.                 type: number
  222.                 example: 1000.5
  223.               currency:
  224.                 type: string
  225.                 example: 'USD'
  226.       responses:
  227.         201:
  228.           description: Transaction created
  229.           schema:
  230.             type: object
  231.             properties:
  232.               amount:
  233.                 type: number
  234.                 example: 1000.5
  235.               id:
  236.                 type: string
  237.                 example: 'f93ee1f9-bcae-446c-ba03-4ef34775ac55'
  238.               created_date:
  239.                 type: string
  240.                 example: '2018-04-27T16:48:55.156069+00:00'
  241.               reference:
  242.                 type: string
  243.               currency:
  244.                 type: string
  245.                 example: 'USD'
  246.               status:
  247.                 type: string
  248.                 example: 'Pending'
  249.               type:
  250.                 type: string
  251.                 example: 'Deposit'
  252.               bond_id:
  253.                 type: string
  254.                 example: 'a93ee1f9-bcae-446c-ba03-4ef34775ac22'
  255.         404:
  256.           description: Account not found
  257.         400:
  258.           description: Missing transaction data
  259.  
  260.   /investor/transactions/{pk}:
  261.     get:
  262.       tags:
  263.      - "account"
  264.       summary: Get a list of an account's transactions
  265.       description: Returns a list containing all transactions of an account
  266.       parameters:
  267.         - name: pk
  268.           in: path
  269.           required: true
  270.           description: Account ID
  271.           type: string
  272.       responses:
  273.         200:
  274.           description: List transactions
  275.           schema:
  276.             type: array
  277.             items:
  278.               properties:
  279.                 amount:
  280.                   type: number
  281.                   example: 1000.5
  282.                 id:
  283.                   type: string
  284.                   example: '9ea37d13-54d0-453e-92fb-50865ede9595'
  285.                 created_date:
  286.                   type: string
  287.                   example: '2018-04-27T16:54:07.658790+00:00'
  288.                 reference:
  289.                   type: string
  290.                 currency:
  291.                   type: string
  292.                   example: 'USD'
  293.                 status:
  294.                   type: string
  295.                   example: 'Pending'
  296.                 type:
  297.                   type: string
  298.                   example: 'Deposit'
  299.                 bond_id:
  300.                   type: string
  301.                   example: 'f93ee1f9-bcae-446c-ba03-4ef34775ac55'
  302.         404:
  303.           description: Account not found
  304.  
  305.   /investor/purchase/{pk}:
  306.     post:
  307.       tags:
  308.      - "account"
  309.       summary: Purchase an amount of bond
  310.       description: Investor will choose a bond, and one of his account. After the purchase successful, that account's balance will be update, so be the bond\'s unit purchased
  311.       parameters:
  312.         - name: pk
  313.           in: path
  314.           required: true
  315.           description: Bond ID
  316.           type: string
  317.         - name: body
  318.           in: body
  319.           required: true
  320.           schema:
  321.             type: object
  322.             properties:
  323.               account_id:
  324.                 type: string
  325.                 example: '4bd295a0-3a60-4326-969b-9b39900d4750'
  326.               purchase_amount:
  327.                 type: integer
  328.                 example: 1000
  329.       responses:
  330.         200:
  331.           description: Purchase successful
  332.           schema:
  333.             type: object
  334.             properties:
  335.               msg:
  336.                 type: string
  337.                 example: 'Purchase success'
  338.               transaction_id:
  339.                 type: string
  340.                 example: '4bd295a0-3a60-4326-969b-9b39900d4750'
  341.         404:
  342.           description: Account not found
  343.         400:
  344.           description: Missing fields or wrong bond ID, or exceed account balance/purchasable units
  345.  
  346.   /investor/dirty-price/{pk}:
  347.     post:
  348.       tags:
  349.      - "account"
  350.       summary: Calculate dirty price when purchase bond
  351.       description: Calculate dirty price when purchase bond
  352.       parameters:
  353.         - name: pk
  354.           in: path
  355.           required: true
  356.           description: Bond ID
  357.           type: string
  358.         - name: body
  359.           in: body
  360.           required: true
  361.           schema:
  362.             type: object
  363.             properties:
  364.               purchase_amount:
  365.                 type: integer
  366.                 example: 1000
  367.       responses:
  368.         200:
  369.           description: Calculate dirty price successful
  370.           schema:
  371.             type: object
  372.             properties:
  373.               dirty_price:
  374.                 type: number
  375.                 example: 1003.34
  376.         404:
  377.           description: Bond not found
  378.         400:
  379.           description: Missing fields or wrong bond ID, or negative number
  380.  
  381.   /investor/admin-approve/{pk}:
  382.     put:
  383.       tags:
  384.      - "account"
  385.       summary: Admin approve the investor deposit or withdrawal transaction
  386.       description: When an investor deposit money to his account, the transactions must be approve by admin before it affect account balance. But when he withdraw money from his account, the balance will update instantly, to prevent other actions with the money have been withdrawed. But this transaction still need to be approved by admin.
  387.       parameters:
  388.         - name: pk
  389.           in: path
  390.           required: true
  391.           description: Transaction ID
  392.           type: string
  393.       responses:
  394.         200:
  395.           description: Admin approved this transaction. Account balance will be change.
  396.           schema:
  397.             type: object
  398.             properties:
  399.               msg:
  400.                 type: string
  401.                 example: Transaction has been completed
  402.         404:
  403.           description: Transaction not found
  404.         400:
  405.           description: Transaction type is not deposit
  406.  
  407.   /investor/admin-reject/{pk}:
  408.     put:
  409.       tags:
  410.      - "account"
  411.       summary: Admin reject the investor deposit or withdrawal transaction
  412.       description: If admin reject a deposit transaction, the account's balance will not be change. But if admin reject a withdrawal transaction, the amount money will be return back to investor account.
  413.       parameters:
  414.         - name: pk
  415.           in: path
  416.           required: true
  417.           description: Transaction ID
  418.           type: string
  419.       responses:
  420.         204:
  421.           description: Admin reject the deposit transaction. Account's balance will not be change
  422.           schema:
  423.             type: object
  424.             properties:
  425.               msg:
  426.                 type: string
  427.                 example: Transaction has been rejected
  428.         200:
  429.           description: Admin reject the withdrawal transaction. Account balance will be change (add transaction amount)
  430.           schema:
  431.             type: object
  432.             properties:
  433.               msg:
  434.                 type: string
  435.                 example: Transaction has been rejected.
  436.         404:
  437.           description: Transaction not found
  438.         400:
  439.           description: Transaction type is not deposit
  440.  
  441.   /investor/purchase-history:
  442.     get:
  443.       tags:
  444.      - "account"
  445.       summary: Gets purchase history
  446.       description: Returns a list containing purchase history of bond ID.
  447.       parameters:
  448.         - name: bond_id
  449.           in: query
  450.           required: true
  451.           description: Bond ID
  452.           type: string
  453.       responses:
  454.         200:
  455.           description: A list of purchase-history
  456.           schema:
  457.             type: array
  458.             items:
  459.               properties:
  460.                 balance:
  461.                   type: number
  462.                   example: 1343.2
  463.                 id:
  464.                   type: string
  465.                   example: '720c7df7-2dcd-449f-bdef-0e761eba7474'
  466.                 balance_updated_date:
  467.                   type: string
  468.                   example: '2018-04-27T15:17:12.877226+00:00'
  469.                 name:
  470.                   type: string
  471.                   example: 'Account 1'
  472.                 currency:
  473.                   type: string
  474.                   example: 'USD'
  475.                 created_date:
  476.                   type: string
  477.                   example: '2018-04-27T15:17:12.877226+00:00'
  478.                 updated_date:
  479.                   type: string
  480.                   example: '2018-04-27T15:17:12.877226+00:00'
  481.  
  482.   /document/{pk}:
  483.     post:
  484.       tags:
  485.      - "document"
  486.       summary: "Upload document"
  487.       description: Upload a pdf document and return a path of document was stored.
  488.       parameters:
  489.         - name: pk
  490.           in: path
  491.           required: true
  492.           description: Bond ID
  493.           type: string
  494.       responses:
  495.         200:
  496.           description: Path of document stored.
  497.           schema:
  498.             type: object
  499.             properties:
  500.               status_code:
  501.                 type: integer
  502.                 description: Response status code
  503.               data:
  504.                 type: object
  505.                 properties:
  506.                   name:
  507.                     type: string
  508.  
  509.   /bonds:
  510.     get:
  511.       tags:
  512.      - "Bond"
  513.       summary: "Get list bonds"
  514.       description: ""
  515.       operationId: "getBonds"
  516.       consumes:
  517.      - "application/json"
  518.       produces:
  519.      - "application/json"
  520.       responses:
  521.         200:
  522.           description: "Get list bonds success"
  523.           schema:
  524.             $ref: "#/definitions/BondList"
  525.     post:
  526.       tags:
  527.      - "Bond"
  528.       summary: "Create a bond"
  529.       description: ""
  530.       operationId: "createBond"
  531.       consumes:
  532.      - "application/json"
  533.       produces:
  534.      - "application/json"
  535.       parameters:
  536.       - in: "body"
  537.         name: "body"
  538.         required: true
  539.         schema:
  540.           $ref: "#/definitions/BondDetail"
  541.       responses:
  542.         201:
  543.           description: "Bond created"
  544.           schema:
  545.             $ref: "#/definitions/BondDetail"
  546.         404:
  547.           description: "Parameters invalid"
  548.  
  549.   /bonds/purchased:
  550.     get:
  551.       tags:
  552.      - "Bond"
  553.       summary: "Get list bonds purchased by investor"
  554.       description: ""
  555.       operationId: "getBondsByInvestor"
  556.       consumes:
  557.      - "application/json"
  558.       produces:
  559.      - "application/json"
  560.       responses:
  561.         200:
  562.           description: "Get list bonds success"
  563.           schema:
  564.             $ref: "#/definitions/BondList"
  565.  
  566.   /bonds/{bond_id}:
  567.     get:
  568.       tags:
  569.      - "Bond"
  570.       summary: "Get Bond detail"
  571.       description: ""
  572.       operationId: "getBond"
  573.       consumes:
  574.      - "application/json"
  575.       produces:
  576.      - "application/json"
  577.       parameters:
  578.       - in: "path"
  579.         name: "bond_id"
  580.         description: "String GUID of a Bond"
  581.         required: true
  582.         type: "string"
  583.         format: "uuid"
  584.       responses:
  585.         200:
  586.           description: "Get Bond detail success"
  587.           schema:
  588.             $ref: "#/definitions/BondDetail"
  589.  
  590.         404:
  591.           description: "Parameters invalid"
  592.     put:
  593.       tags:
  594.      - "Bond"
  595.       summary: "Update Bond"
  596.       operationId: "updateBond"
  597.       consumes:
  598.      - "application/json"
  599.       produces:
  600.      - "application/json"
  601.       parameters:
  602.       - in: "path"
  603.         name: "bond_id"
  604.         description: "String GUID of a Bond"
  605.         required: true
  606.         type: "string"
  607.         format: "uuid"
  608.       - in: "body"
  609.         name: "body"
  610.         required: true
  611.         schema:
  612.           $ref: "#/definitions/BondDetail"
  613.       responses:
  614.         200:
  615.           description: "Update Bond success"
  616.           schema:
  617.             $ref: "#/definitions/BondDetail"
  618.  
  619.         404:
  620.           description: "Parameters invalid"
  621.     delete:
  622.       tags:
  623.      - "Bond"
  624.       summary: "Delete a Bond"
  625.       operationId: "deleteBond"
  626.       consumes:
  627.      - "application/json"
  628.       produces:
  629.      - "application/json"
  630.       parameters:
  631.       - in: "path"
  632.         name: "pk"
  633.         description: "String GUID of a Bond"
  634.         required: true
  635.         type: "string"
  636.         format: "uuid"
  637.       responses:
  638.         200:
  639.           description: "Delete bond success"
  640.           schema:
  641.             $ref: "#/definitions/BondDetail"
  642.         404:
  643.           description: "Parameters invalid"
  644.  
  645.   /bonds/{bond_id}/launch:
  646.     put:
  647.       tags:
  648.      - "Bond"
  649.       summary: "Launch Bond"
  650.       operationId: "launchBond"
  651.       consumes:
  652.      - "application/json"
  653.       produces:
  654.      - "application/json"
  655.       parameters:
  656.       - in: "path"
  657.         name: "bond_id"
  658.         description: "String GUID of a Bond"
  659.         required: true
  660.         type: "string"
  661.         format: "uuid"
  662.       responses:
  663.         200:
  664.           description: "Bond launched"
  665.           schema:
  666.             $ref: "#/definitions/BondDetail"
  667.         404:
  668.           description: "Parameters invalid"
  669.  
  670.   /bonds/{bond_id}/admin-reject:
  671.     put:
  672.       tags:
  673.      - "Bond"
  674.       summary: "Admin reject Bond"
  675.       operationId: "adminRejectBond"
  676.       consumes:
  677.      - "application/json"
  678.       produces:
  679.      - "application/json"
  680.       parameters:
  681.       - in: "path"
  682.         name: "bond_id"
  683.         description: "String GUID of a Bond"
  684.         required: true
  685.         type: "string"
  686.         format: "uuid"
  687.       responses:
  688.         200:
  689.           description: "Bond rejected by Admin"
  690.           schema:
  691.             $ref: "#/definitions/BondDetail"
  692.         404:
  693.           description: "Parameters invalid"
  694.  
  695.   /bonds/{bond_id}/admin-approve:
  696.     put:
  697.       tags:
  698.      - "Bond"
  699.       summary: "Admin approve Bond"
  700.       operationId: "adminApproveBond"
  701.       consumes:
  702.      - "application/json"
  703.       produces:
  704.      - "application/json"
  705.       parameters:
  706.       - in: "path"
  707.         name: "bond_id"
  708.         description: "String GUID of a Bond"
  709.         required: true
  710.         type: "string"
  711.         format: "uuid"
  712.       responses:
  713.         200:
  714.           description: "Bond approved by Admin"
  715.           schema:
  716.             $ref: "#/definitions/BondDetail"
  717.         404:
  718.           description: "Parameters invalid"
  719.  
  720.   /bonds/{bond_id}/legal-reject:
  721.     put:
  722.       tags:
  723.      - "Bond"
  724.       summary: "Legal reject Bond"
  725.       description: "When legal reject a bond, its status change to Draft. And legal can not revert this action after it done."
  726.       operationId: "legalRejectBond"
  727.       consumes:
  728.      - "application/json"
  729.       produces:
  730.      - "application/json"
  731.       parameters:
  732.       - in: "path"
  733.         name: "bond_id"
  734.         description: "String GUID of a Bond"
  735.         required: true
  736.         type: "string"
  737.         format: "uuid"
  738.       responses:
  739.         200:
  740.           description: "Bond rejected by Legal"
  741.           schema:
  742.             $ref: "#/definitions/BondDetail"
  743.         404:
  744.           description: "Bond not found"
  745.         400:
  746.           description: "Bond's status is not valid"
  747.  
  748.   /bonds/{bond_id}/legal-approve:
  749.     put:
  750.       tags:
  751.      - "Bond"
  752.       summary: "Legal approve Bond"
  753.       operationId: "legalApproveBond"
  754.       consumes:
  755.      - "application/json"
  756.       produces:
  757.      - "application/json"
  758.       parameters:
  759.       - in: "path"
  760.         name: "bond_id"
  761.         description: "String GUID of a Bond"
  762.         required: true
  763.         type: "string"
  764.         format: "uuid"
  765.       responses:
  766.         200:
  767.           description: "Bond approved by Legal"
  768.           schema:
  769.             $ref: "#/definitions/BondDetail"
  770.         404:
  771.           description: "Bond not found"
  772.         400:
  773.           description: "Bond's status is not valid"
  774.  
  775. definitions:
  776.   IssuerDetail:
  777.     type: object
  778.     properties:
  779.       address:
  780.         type: object
  781.         properties:
  782.           address_line_one:
  783.             type: string
  784.             example: "123 ABC Road"
  785.           address_line_two:
  786.             type: string
  787.             example: "More address"
  788.           area:
  789.             type: string
  790.             example: "UK"
  791.           city:
  792.             type: string
  793.             example: "London"
  794.           country:
  795.             type: string
  796.             example: "UK"
  797.           postcode:
  798.             type: string
  799.             example: "EC1A 1BB"
  800.       issuer_id:
  801.         type: string
  802.         example: "99163426-79c4-4cff-ae72-98f9fa623b08"
  803.       issuer_name:
  804.         type: string
  805.         example: "Company ABC"
  806.       issuer_website:
  807.         type: string
  808.         example: "https://www.companyabc.com"
  809.  
  810.   BondTerms:
  811.     type: object
  812.     properties:
  813.       agent:
  814.         type: string
  815.         example: "Blockex"
  816.       annual_coupon_payment:
  817.         type: string
  818.         example: '0'
  819.       bond_create_date:
  820.         type: string
  821.         example: '2018-05-08T17:24:07.760588+00:00'
  822.       bond_status:
  823.         type: string
  824.         example: 'matured'
  825.       borrowing_status:
  826.         type: string
  827.         example: 'Senior'
  828.       business:
  829.         type: string
  830.         example: 'London'
  831.       calculation_basis:
  832.         type: string
  833.         example: 'ACT/365'
  834.       coupon_frequency:
  835.         type: string
  836.         example: "annual"
  837.       coupon_payment:
  838.         type: string
  839.         example: '0'
  840.       coupon_rate:
  841.         type: string
  842.         example: 0.05
  843.       currency:
  844.         type: string
  845.         example: 'GBP'
  846.       description:
  847.         type: string
  848.         example: "Description"
  849.       id:
  850.         type: string
  851.         example: 'be70e9d8-5f40-45ab-9a53-5b6cb5efd4f6'
  852.       interest_basis:
  853.         type: string
  854.         example: 'Fixed'
  855.       issue_date:
  856.         type: string
  857.         example: '2018-05-15'
  858.       issue_size:
  859.         type: integer
  860.         example: 10000
  861.       last_updated_date:
  862.         type: string
  863.         example: '2018-05-08T17:24:07.760588+00:00'
  864.       maturity_date:
  865.         type: string
  866.         example: '2028-05-15'
  867.       name:
  868.         type: string
  869.         example: 'Bond name'
  870.       price:
  871.         type: integer
  872.         example: 100
  873.       redemption_amount:
  874.         type: string
  875.         example: 'Principal'
  876.       redemption_date:
  877.         type: string
  878.         example: '2018-06-15'
  879.       redemption_period:
  880.         type: string
  881.         example: 1
  882.       trustee:
  883.         type: string
  884.         example: 'Blockex'
  885.       type:
  886.         type: string
  887.         example: 'Bullet'
  888.       units_purchased:
  889.         type: integer
  890.         example: 45
  891.  
  892.   BondDetail:
  893.     type: object
  894.     properties:
  895.       issuer:
  896.         type: object
  897.         $ref: "#/definitions/IssuerDetail"
  898.       terms:
  899.         type: object
  900.         $ref: "#/definitions/BondTerms"
  901.  
  902.   BondList:
  903.     type: array
  904.     items:
  905.       type: object
  906.       properties:
  907.         bond_create_date:
  908.           type: string
  909.           example: '2018-05-08T17:24:07.760588+00:00'
  910.         bond_status:
  911.           type: string
  912.           example: 'matured'
  913.         calculation_basis:
  914.           type: string
  915.           example: 'ACT/365'
  916.         coupon_frequency:
  917.           type: string
  918.           example: "annual"
  919.         coupon_rate:
  920.           type: string
  921.           example: 0.05
  922.         currency:
  923.           type: string
  924.           example: 'GBP'
  925.         id:
  926.           type: string
  927.           example: 'be70e9d8-5f40-45ab-9a53-5b6cb5efd4f6'
  928.         issue_date:
  929.           type: string
  930.           example: '2018-05-15'
  931.         issue_size:
  932.           type: integer
  933.           example: 10000
  934.         redemption_date:
  935.           type: string
  936.           example: '2018-06-15'
  937.         redemption_period:
  938.           type: string
  939.           example: 1
  940.         issuer_id:
  941.           type: string
  942.           example: 'be70e9d8-5f40-45ab-9a53-5b6cb5efd4f6'
  943.         issuser_name:
  944.           type: string
  945.           example: 'Alex'
  946.         issuer_description:
  947.           type: string
  948.           example: "Description"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement