-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
328 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea | ||
node_modules | ||
package-lock.json | ||
package-lock.json | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
get: | ||
tags: | ||
- user | ||
summary: Get trading account | ||
description: Returns user's trading account | ||
operationId: getTradingAccount | ||
parameters: | ||
- in: path | ||
name: trading_account_id | ||
required: true | ||
schema: | ||
$ref: '../../models/trading_account.yaml#/components/schemas/TradingAccountId' | ||
|
||
responses: | ||
"200": | ||
description: Success | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../models/trading_account.yaml#/components/schemas/TradingAccount' | ||
"404": | ||
description: Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* OPEN OUTCRY API | ||
* | ||
* # Introduction This API is documented in **OpenAPI 3.0 format**. This API the following operations: * Retrieve a list of available instruments * Retrieve a list of executed trades # Basics * API calls have to be secured with HTTPS. * All data has to be submitted UTF-8 encoded. * The reply is sent JSON encoded. | ||
* | ||
* API version: 1.0.0 | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package api | ||
|
||
type TradingAccount struct { | ||
Id *interface{} `json:"id"` | ||
|
||
Instruments *interface{} `json:"instruments"` | ||
} | ||
|
||
// AssertTradingAccountRequired checks if the required fields are not zero-ed | ||
func AssertTradingAccountRequired(obj TradingAccount) error { | ||
elements := map[string]interface{}{ | ||
"id": obj.Id, | ||
"instruments": obj.Instruments, | ||
} | ||
for name, el := range elements { | ||
if isZero := IsZeroValue(el); isZero { | ||
return &RequiredError{Field: name} | ||
} | ||
} | ||
|
||
return nil | ||
} | ||
|
||
// AssertTradingAccountConstraints checks if the values respects the defined constraints | ||
func AssertTradingAccountConstraints(obj TradingAccount) error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* OPEN OUTCRY API | ||
* | ||
* # Introduction This API is documented in **OpenAPI 3.0 format**. This API the following operations: * Retrieve a list of available instruments * Retrieve a list of executed trades # Basics * API calls have to be secured with HTTPS. * All data has to be submitted UTF-8 encoded. * The reply is sent JSON encoded. | ||
* | ||
* API version: 1.0.0 | ||
* Generated by: OpenAPI Generator (https://openapi-generator.tech) | ||
*/ | ||
|
||
package api | ||
|
||
type TradingAccountInstrument struct { | ||
|
||
// Ticker-like name of the instrument. For monetary instruments, a currency pair is used. | ||
Name *interface{} `json:"name"` | ||
|
||
Amount *interface{} `json:"amount"` | ||
|
||
AmountReserved *interface{} `json:"amountReserved"` | ||
|
||
AmountAvailable *interface{} `json:"amountAvailable"` | ||
|
||
Value *interface{} `json:"value"` | ||
|
||
// ISO 4217 Currency symbol | ||
Currency *interface{} `json:"currency"` | ||
} | ||
|
||
// AssertTradingAccountInstrumentRequired checks if the required fields are not zero-ed | ||
func AssertTradingAccountInstrumentRequired(obj TradingAccountInstrument) error { | ||
elements := map[string]interface{}{ | ||
"name": obj.Name, | ||
"amount": obj.Amount, | ||
"amountReserved": obj.AmountReserved, | ||
"amountAvailable": obj.AmountAvailable, | ||
"value": obj.Value, | ||
"currency": obj.Currency, | ||
} | ||
for name, el := range elements { | ||
if isZero := IsZeroValue(el); isZero { | ||
return &RequiredError{Field: name} | ||
} | ||
} | ||
|
||
return nil | ||
} | ||
|
||
// AssertTradingAccountInstrumentConstraints checks if the values respects the defined constraints | ||
func AssertTradingAccountInstrumentConstraints(obj TradingAccountInstrument) error { | ||
return nil | ||
} |
Oops, something went wrong.