Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- description: "centralized turtle base pair exchange."
- version: "1.0.0"
- title: "trtl.exchange"
- termsOfService: "https://trtl.exchange"
- contact:
- email: "apiteam@trtl.exchange"
- license:
- name: "Apache 2.0"
- url: "http://www.apache.org/licenses/LICENSE-2.0.html"
- host: "exchange.turtlecoin.lol"
- basePath: "/v2"
- tags:
- - name: "withdraw"
- description: "Users need to withdraw money"
- - name: "deposit"
- description: "Users need to deposit money"
- - name: "user"
- description: "Operations about user"
- - name: "order"
- description: "Operations about buysell orders"
- - name: "wallet"
- description: "Operations about wallets holding currency"
- - name: "market"
- description: "Operations about tradepairs"
- schemes:
- - "https"
- paths:
- /order:
- post:
- tags:
- - "order"
- summary: "Add a new order to the queue"
- description: ""
- operationId: "addOrder"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Order object that needs to be added to the queue"
- required: true
- schema:
- $ref: "#/definitions/Order"
- responses:
- 405:
- description: "Invalid input"
- security:
- - exchange_auth:
- - "write:orders"
- - "read:orders"
- put:
- tags:
- - "order"
- summary: "Update an existing order"
- description: ""
- operationId: "updateOrder"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Order object that needs to be added to the queue"
- required: true
- schema:
- $ref: "#/definitions/Order"
- responses:
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Order not found"
- 405:
- description: "Validation exception"
- /order/{orderId}:
- get:
- tags:
- - "order"
- summary: "Find order by ID"
- description: "Returns a single order"
- operationId: "getOrderById"
- produces:
- - "application/json"
- parameters:
- - name: "orderId"
- in: "path"
- description: "ID of order to return"
- required: true
- type: "integer"
- format: "int64"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Order"
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Order not found"
- security:
- - api_key: []
- post:
- tags:
- - "order"
- summary: "Updates an order in the store with form data"
- description: ""
- operationId: "updateOrderWithForm"
- consumes:
- - "application/x-www-form-urlencoded"
- produces:
- - "application/json"
- parameters:
- - name: "orderId"
- in: "path"
- description: "ID of order that needs to be updated"
- required: true
- type: "integer"
- format: "int64"
- - name: "name"
- in: "formData"
- description: "Updated name of the order"
- required: false
- type: "string"
- - name: "status"
- in: "formData"
- description: "Updated status of the order"
- required: false
- type: "string"
- responses:
- 405:
- description: "Invalid input"
- delete:
- tags:
- - "order"
- summary: "Deletes an order"
- description: ""
- operationId: "deleteOrder"
- produces:
- - "application/json"
- parameters:
- - name: "api_key"
- in: "header"
- required: false
- type: "string"
- - name: "orderId"
- in: "path"
- description: "order id to delete"
- required: true
- type: "integer"
- format: "int64"
- responses:
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Order not found"
- /market:
- /market/trtl-mtip:
- /market/trtl-ple:
- /market/trtl-xmlc:
- /user/{username}/wallet:
- post:
- tags:
- - "wallet"
- summary: "Add a new order to the queue"
- description: ""
- operationId: "addWallet"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Order object that needs to be added to the queue"
- required: true
- schema:
- $ref: "#/definitions/Wallet"
- responses:
- 405:
- description: "Invalid input"
- security:
- - exchange_auth:
- - "write:wallets"
- - "read:wallets"
- put:
- tags:
- - "wallet"
- summary: "Update an existing wallet"
- description: ""
- operationId: "updateOrder"
- consumes:
- - "application/json"
- produces:
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Wallet object that needs to be added to the exchange"
- required: true
- schema:
- $ref: "#/definitions/Wallet"
- responses:
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Wallet not found"
- 405:
- description: "Validation exception"
- /user:
- post:
- tags:
- - "user"
- summary: "Create user"
- description: "This can only be done by the logged in user."
- operationId: "createUser"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - in: "body"
- name: "body"
- description: "Created user object"
- required: true
- schema:
- $ref: "#/definitions/User"
- responses:
- default:
- description: "successful operation"
- /user/login:
- get:
- tags:
- - "user"
- summary: "Logs user into the system"
- description: ""
- operationId: "loginUser"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "username"
- in: "query"
- description: "The user name for login"
- required: true
- type: "string"
- - name: "password"
- in: "query"
- description: "The password for login in clear text"
- required: true
- type: "string"
- responses:
- 200:
- description: "successful operation"
- schema:
- type: "string"
- headers:
- X-Rate-Limit:
- type: "integer"
- format: "int32"
- description: "calls per hour allowed by the user"
- X-Expires-After:
- type: "string"
- format: "date-time"
- description: "date in UTC when token expires"
- 400:
- description: "Invalid username/password supplied"
- /user/logout:
- get:
- tags:
- - "user"
- summary: "Logs out current logged in user session"
- description: ""
- operationId: "logoutUser"
- produces:
- - "application/xml"
- - "application/json"
- parameters: []
- responses:
- default:
- description: "successful operation"
- /user/{username}:
- get:
- tags:
- - "user"
- summary: "Get user by user name"
- description: ""
- operationId: "getUserByName"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "username"
- in: "path"
- description: "The name that needs to be fetched. Use user1 for testing. "
- required: true
- type: "string"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/User"
- 400:
- description: "Invalid username supplied"
- 404:
- description: "User not found"
- put:
- tags:
- - "user"
- summary: "Updated user"
- description: "This can only be done by the logged in user."
- operationId: "updateUser"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "username"
- in: "path"
- description: "name that need to be updated"
- required: true
- type: "string"
- - in: "body"
- name: "body"
- description: "Updated user object"
- required: true
- schema:
- $ref: "#/definitions/User"
- responses:
- 400:
- description: "Invalid user supplied"
- 404:
- description: "User not found"
- delete:
- tags:
- - "user"
- summary: "Delete user"
- description: "This can only be done by the logged in user."
- operationId: "deleteUser"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "username"
- in: "path"
- description: "The name that needs to be deleted"
- required: true
- type: "string"
- responses:
- 400:
- description: "Invalid username supplied"
- 404:
- description: "User not found"
- securityDefinitions:
- exchange_auth:
- type: "oauth2"
- authorizationUrl: "http://orderstore.swagger.io/oauth/dialog"
- flow: "implicit"
- scopes:
- write:orders: "modify orders in your account"
- read:orders: "read your orders"
- api_key:
- type: "apiKey"
- name: "api_key"
- in: "header"
- definitions:
- Category:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- xml:
- name: "Category"
- User:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- username:
- type: "string"
- firstName:
- type: "string"
- lastName:
- type: "string"
- email:
- type: "string"
- password:
- type: "string"
- phone:
- type: "string"
- userStatus:
- type: "integer"
- format: "int32"
- description: "User Status"
- Tag:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- xml:
- name: "Tag"
- Order:
- type: "object"
- required:
- - "name"
- - "photoUrls"
- properties:
- id:
- type: "integer"
- format: "int64"
- category:
- $ref: "#/definitions/Category"
- name:
- type: "string"
- example: "doggie"
- photoUrls:
- type: "array"
- xml:
- name: "photoUrl"
- wrapped: true
- items:
- type: "string"
- tags:
- type: "array"
- xml:
- name: "tag"
- wrapped: true
- items:
- $ref: "#/definitions/Tag"
- status:
- type: "string"
- description: "order status in the store"
- enum:
- - "available"
- - "pending"
- - "sold"
- xml:
- name: "Order"
- ApiResponse:
- type: "object"
- properties:
- code:
- type: "integer"
- format: "int32"
- type:
- type: "string"
- message:
- type: "string"
- externalDocs:
- description: "Find out more about Swagger"
- url: "http://swagger.io"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement