# Gateways

The gateways form one of the primary tables for it holds the gateway credentials, IP and port information for each gateway present in the system. In the event of a trade, this table is pre-mapped with the Plaform and GatewayType tables that defines the flow of information through the respective gateway.

The fields for the Gateway table are:

**Table Name:&#x20;*****Gateways***

| **Column Name** | **Data Type** | **Valid Values** | **Allow Nulls** | **Description**                                                                                                                                                                                         |
| --------------- | ------------- | ---------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PK\_GatewayID   | int identity  |                  | No              | This field consists of unique IDs of the gateway through which the trade occurs.                                                                                                                        |
| Login           | varchar       |                  | No              | The field has login information for each gateway.                                                                                                                                                       |
| Password        | varchar       |                  | No              | The field contains password corresponding to the Login ID.                                                                                                                                              |
| FK\_Platform    | int           |                  | No              | This field contains the Platform ID and is linked with the [*Platform*](https://tradesocio-2.gitbook.io/database/-M0zsOmLRwjq8DxZcb4l/database-design/common-tables/untitled-73) table.                 |
| FK\_GatewayType | int           |                  | No              | This field contains the gateway type information and is linked with the [*GatewayType*](https://tradesocio-2.gitbook.io/database/-M0zsOmLRwjq8DxZcb4l/database-design/common-tables/untitled-54) table. |
| LastUpdatedTime | datetime      | (getutcdate())   | No              | The time when the last update took place.                                                                                                                                                               |
| IP              | varchar       |                  | No              | The information of the IP with which the connection needs to be established.                                                                                                                            |
| port            | int           |                  | No              | The information of the port with which the connection needs to be established.                                                                                                                          |
| tcpClientPort   | int           |                  | Yes             |                                                                                                                                                                                                         |
