openapi: 3.1.0 info: title: X2Y2 Fi Chain Events API version: '3.0' servers: - url: https://loan-api.x2y2.org/ - url: https://goerli-loan-api.x2y2.org/ security: - sec0: [] tags: - name: Events paths: /v1/events: get: summary: Fetch events operationId: get-v1-events security: - ApiKeyAuth: [] tags: - Events parameters: - in: query name: from_address description: Filter by event from address schema: type: string required: false - in: query name: to_address description: Filter by event to address schema: type: string required: false - in: query name: type description: Filter by the event type schema: type: string enum: - list - sale - cancel_listing required: true - in: query name: contract description: Filter by contract address schema: type: string required: false - in: query name: token_id description: Filter by the token ID of contract. Needs to be sent together with `contract`. schema: type: integer required: false - in: query name: created_before description: Filter orders listed before this timestamp. schema: type: string required: false - in: query name: created_after description: Filter orders listed after this timestamp. schema: type: string required: false - in: query name: limit description: Number of events to return (capped at 200). schema: type: integer required: false - in: query name: cursor description: A cursor to be supplied as a query param to retrieve the next page. schema: type: string required: false responses: '200': description: Successful content: application/json: schema: $ref: '#/components/schemas/EventResponse' components: schemas: EventResponse: type: object properties: success: type: boolean default: true next: type: string default: null data: type: array items: $ref: '#/components/schemas/Event' required: - success Event: type: object properties: id: type: integer default: 1 from_address: type: string default: '0x40415c1c0e7a8ff3e184b51a94a2fc5b92df9434' to_address: type: string default: '0x6c6fa394709ed4c9c593344350c99dfcd1cae364' token: $ref: '#/components/schemas/TokenLite' order: $ref: '#/components/schemas/Order' tx: type: string default: null type: type: string default: offer_listing created_at: type: string default: 1654983000 Order: type: object properties: id: type: integer default: 1 item_hash: type: string default: '0x41a2753400f805db148079f60355df470aece45941a45cb96a25ab5d24e4c243' maker: type: string default: '0x40415c1c0e7a8ff3e184b51a94a2fc5b92df9434' taker: type: string default: null token: $ref: '#/components/schemas/TokenLite' price: type: string default: '48700000000000000' currency: type: string default: '0x0000000000000000000000000000000000000000' type: type: string default: sell is_collection_offer: type: string default: false royalty_fee: type: integer default: 0 description: Base rate is 10^6. For example, 50000 means 5% created_at: type: string default: 1654983000 end_at: type: string default: 1654999000 required: - type TokenLite: type: object properties: contract: type: string default: '0xef1a89cbfabe59397ffda11fc5df293e9bc5db90' nullable: false token_id: type: integer default: 1 nullable: false erc_type: type: string default: erc721 enum: - erc721 - erc1155 nullable: false securitySchemes: sec0: type: apiKey in: header name: X-API-KEY